FAQ
Hi all,

I keep getting the following error when there's a problem with my code:

*Unknown error\nCompilation failed in require at
/usr/local/lib/perl5/site_perl/5.10.0/Catalyst/Utils.pm line 272.*

I get this error in error_log when trying to start Apache with buggy
code... not very helpful when trying to debug!

As an example, the following code (in my Root.pm):

sub test :Local
{
my ($self, $c) = @_;
my $this = 'hello world';
$c->res->body($that);
}

...gives me the error. I'd expect the error message to be:Global symbol
"$that" requires explicit package name

Is this a common gotcha?

Ben

Search Discussions

  • Kieren Diment at Mar 28, 2009 at 10:32 pm
    <@kd> purl, unknown error
    22:32 < purl> well, unknown error is always caused by a syntax error
    in a controller or
    http://bugs.debian.org/cgi-bin/bugreport.cgi?bugH8088
    On 29/03/2009, at 9:29 AM, Ben Vinnerd wrote:

    Hi all,

    I keep getting the following error when there's a problem with my
    code:

    *Unknown error\nCompilation failed in require at /usr/local/lib/
    perl5/site_perl/5.10.0/Catalyst/Utils.pm line 272.*

    I get this error in error_log when trying to start Apache with buggy
    code... not very helpful when trying to debug!

    As an example, the following code (in my Root.pm):

    sub test :Local
    {
    my ($self, $c) = @_;
    my $this = 'hello world';
    $c->res->body($that);
    }

    ...gives me the error. I'd expect the error message to be:Global
    symbol "$that" requires explicit package name

    Is this a common gotcha?

    Ben


    _______________________________________________
    List: Catalyst@lists.scsys.co.uk
    Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
    Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
    Dev site: http://dev.catalyst.perl.org/
  • Ben Vinnerd at Mar 28, 2009 at 10:43 pm
    Thanks very much, Kieren. This has been driving me insane, as i use
    Catalyst both at work and home, and only get this problem at home. Now i
    know the reason why.

    Cheers :)

    Ben


    Kieren Diment wrote:
    <@kd> purl, unknown error
    22:32 < purl> well, unknown error is always caused by a syntax error
    in a controller or
    http://bugs.debian.org/cgi-bin/bugreport.cgi?bugH8088
    On 29/03/2009, at 9:29 AM, Ben Vinnerd wrote:

    Hi all,

    I keep getting the following error when there's a problem with my code:

    *Unknown error\nCompilation failed in require at
    /usr/local/lib/perl5/site_perl/5.10.0/Catalyst/Utils.pm line 272.*

    I get this error in error_log when trying to start Apache with buggy
    code... not very helpful when trying to debug!

    As an example, the following code (in my Root.pm):

    sub test :Local
    {
    my ($self, $c) = @_;
    my $this = 'hello world';
    $c->res->body($that);
    }

    ...gives me the error. I'd expect the error message to be:Global
    symbol "$that" requires explicit package name

    Is this a common gotcha?

    Ben


    _______________________________________________
    List: Catalyst@lists.scsys.co.uk
    Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
    Searchable archive:
    http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
    Dev site: http://dev.catalyst.perl.org/

    _______________________________________________
    List: Catalyst@lists.scsys.co.uk
    Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
    Searchable archive:
    http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
    Dev site: http://dev.catalyst.perl.org/

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedMar 28, '09 at 10:29p
activeMar 28, '09 at 10:43p
posts3
users2
websitecatalystframework.org
irc#catalyst

2 users in discussion

Ben Vinnerd: 2 posts Kieren Diment: 1 post

People

Translate

site design / logo © 2022 Grokbase