Created
April 6, 2011 16:11
-
-
Save memowe/905941 to your computer and use it in GitHub Desktop.
WTF: Can't locate object method "search" via "Mojolicious::Lite" at Foo.pm line 6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use Mojolicious::Lite; | |
use Foo; | |
get '/' => sub { shift->render_text(ref Foo->new->bar) }; | |
app->start; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Foo; | |
use Mojo::Base -base; | |
use Mojo::Loader; | |
has bar => sub { Mojo::Loader->new->search('Bar') }; | |
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ perl foo.pl daemon --reload | |
Wed Apr 6 18:08:35 2011 info Mojo::Server::Daemon:319 [14089]: Server listening (http://*:3000) | |
Server available at http://*:3000. | |
Wed Apr 6 18:08:37 2011 debug Mojolicious:22 [14089]: Your secret passphrase needs to be changed!!! | |
Wed Apr 6 18:08:37 2011 debug Mojolicious::Plugin::RequestTimer:24 [14089]: GET / (Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0) Gecko/20100101 Firefox/4.0). | |
Wed Apr 6 18:08:37 2011 debug Mojolicious::Routes:418 [14089]: Dispatching callback. | |
Wed Apr 6 18:08:37 2011 error Mojolicious::Routes:434 [14089]: Can't locate object method "search" via "Mojolicious::Lite" at Foo.pm line 6 | |
Wed Apr 6 18:08:37 2011 error Mojolicious::Controller:318 [14089]: Can't locate object method "search" via "Mojolicious::Lite" at Foo.pm line 6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment