[Dancer-users] Problems loading an app

Juan J. Martínez reidrac at usebox.net
Sat Apr 24 22:25:22 CEST 2010


El sáb, 24-04-2010 a las 21:15 +0100, Juan J. Martínez escribió:
> [...]
> I already showed you two examples. Let me try it again :)

At least I tried, excuse my English :(

--- CUT test.pm ---
package test;
use Dancer ':syntax';

our $VERSION = '0.1';

get '/' => sub {
	my $w = "whatever";

	print "test" if $w =~ m/$fail/;

    template 'index';
};

true;
--- CUT ---

Case 1:

--- CUT test.pl ---
#!/usr/bin/perl
use Dancer;
load_app 'test';
dance;
--- CUT ---

Error reported:

unable to load application test at ../local/Dancer.pm line 155.

Case 2:

--- CUT test.pl ---
#!/usr/bin/perl
use Dancer;
use test;
dance;
--- CUT ---

Error reported:

Global symbol "$fail" requires explicit package name
at /home/reidrac/src/dancer/test/lib/test.pm line 9.
Compilation failed in require at ./test.pl line 4.
BEGIN failed--compilation aborted at ./test.pl line 4.

**

I was complaining about case 1, because I guess the error report should
be as verbose as case 2.

Regards,

Juanjo

-- 
jjm's home: http://www.usebox.net/jjm/
blackshell: http://blackshell.usebox.net/
 ramble on: http://rambleon.usebox.net/




More information about the Dancer-users mailing list