[Dancer-users] Problems loading an app

sawyer x xsawyerx at gmail.com
Tue Apr 27 22:56:18 CEST 2010

2010/4/27 Juan J. <reidrac at usebox.net>

> Hello,


Any comment on this? Should I file a bug report?

Sorry for the late reply, I've personally been a bit busy and I reckon so
where a few other people on the list.

I've gone over your code. There are two issues:

1. Instead of 'load_app("test")', you should write 'use load;'. That would
fix the first issue.
2. You accidentally used a variable "$fail" when you haven't declared it
yet. Here is a working version:
# ---- test.pl ----
use Dancer;
use test;

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

our $VERSION = '0.1';

get '/' => sub {
    my $w    = "whatever";
    my $fail = "nothing";
    print "test" if $w =~ m/$fail/;
    template 'index';

# ---- ----

Happy dancing, :)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20100427/fc46ea2b/attachment.htm>

More information about the Dancer-users mailing list