I get the same result for your one-liner,, which I found strange so I ran
this one:
$ perl -Mojo -E "say Mojolicious->VERSION"
5.67
but when I run this simple server via `$ morbo server.pl`:
#!/usr/bin/perl
no warnings;
use Mojolicious::Lite;
our $version = Mojolicious->VERSION;
get( '/' => sub {
my $c = shift;
my $serialized = $c->dumper(app->renderer->helpers);
$c->render( text => $version ."\n". $serialized );
} );
app->start;
... I get:
5.12
{ "accepts" => sub { "DUMMY" }, "app" => sub { "DUMMY" }, "b" => sub {
"DUMMY" }, "c" => sub { "DUMMY" }, "check_box" => sub { "DUMMY" },
"color_field" => sub { "DUMMY" }, "config" => sub { "DUMMY" }, "content" =>
sub { "DUMMY" }, "content_for" => sub { "DUMMY" }, "csrf_field" => sub {
"DUMMY" }, "csrf_token" => sub { "DUMMY" }, "current_route" => sub {
"DUMMY" }, "date_field" => sub { "DUMMY" }, "datetime_field" => sub {
"DUMMY" }, "delay" => sub { "DUMMY" }, "dumper" => sub { "DUMMY" },
"email_field" => sub { "DUMMY" }, "extends" => sub { "DUMMY" },
"file_field" => sub { "DUMMY" }, "flash" => sub { "DUMMY" }, "form_for" =>
sub { "DUMMY" }, "hidden_field" => sub { "DUMMY" }, "image" => sub {
"DUMMY" }, "inactivity_timeout" => sub { "DUMMY" }, "include" => sub {
"DUMMY" }, "input_tag" => sub { "DUMMY" }, "javascript" => sub { "DUMMY" },
"label_for" => sub { "DUMMY" }, "layout" => sub { "DUMMY" }, "link_to" =>
sub { "DUMMY" }, "month_field" => sub { "DUMMY" }, "number_field" => sub {
"DUMMY" }, "param" => sub { "DUMMY" }, "password_field" => sub { "DUMMY" },
"radio_button" => sub { "DUMMY" }, "range_field" => sub { "DUMMY" },
"search_field" => sub { "DUMMY" }, "select_field" => sub { "DUMMY" },
"session" => sub { "DUMMY" }, "stash" => sub { "DUMMY" }, "stylesheet" =>
sub { "DUMMY" }, "submit_button" => sub { "DUMMY" }, "t" => sub { "DUMMY"
}, "tag" => $VAR1->{"t"}, "tag_with_error" => sub { "DUMMY" }, "tel_field"
=> sub { "DUMMY" }, "text_area" => sub { "DUMMY" }, "text_field" => sub {
"DUMMY" }, "time_field" => sub { "DUMMY" }, "title" => sub { "DUMMY" },
"ua" => sub { "DUMMY" }, "url_field" => sub { "DUMMY" }, "url_for" => sub {
"DUMMY" }, "url_with" => sub { "DUMMY" }, "validation" => sub { "DUMMY" },
"week_field" => sub { "DUMMY" } }
Any idea why invoking morbo gives me a different (older) version of
mojolicious?
Thanks,
Rev
On Friday, November 28, 2014 10:47:12 AM UTC-8, sri wrote:
>
> If the reply helper needs to be explicitly imported, these docs are way
>> out-of-date:
>> http://mojolicio.us/perldoc/Mojolicious/Plugin/DefaultHelpers#reply-asset
>>
>
> No idea what you're talking about.
>
> $ perl -Mojo -E 'say r app->renderer->helpers'
>
> {
>
> "accepts" => sub { "DUMMY" },
>
> "app" => sub { "DUMMY" },
>
> "b" => sub { "DUMMY" },
>
> "c" => sub { "DUMMY" },
>
> "check_box" => sub { "DUMMY" },
>
> "color_field" => sub { "DUMMY" },
>
> "config" => sub { "DUMMY" },
>
> "content" => sub { "DUMMY" },
>
> "content_for" => sub { "DUMMY" },
>
> "csrf_field" => sub { "DUMMY" },
>
> "csrf_token" => sub { "DUMMY" },
>
> "current_route" => sub { "DUMMY" },
>
> "date_field" => sub { "DUMMY" },
>
> "datetime_field" => sub { "DUMMY" },
>
> "delay" => sub { "DUMMY" },
>
> "dumper" => sub { "DUMMY" },
>
> "email_field" => sub { "DUMMY" },
>
> "extends" => sub { "DUMMY" },
>
> "file_field" => sub { "DUMMY" },
>
> "flash" => sub { "DUMMY" },
>
> "form_for" => sub { "DUMMY" },
>
> "hidden_field" => sub { "DUMMY" },
>
> "image" => sub { "DUMMY" },
>
> "inactivity_timeout" => sub { "DUMMY" },
>
> "include" => sub { "DUMMY" },
>
> "input_tag" => sub { "DUMMY" },
>
> "is_fresh" => sub { "DUMMY" },
>
> "javascript" => sub { "DUMMY" },
>
> "label_for" => sub { "DUMMY" },
>
> "layout" => sub { "DUMMY" },
>
> "link_to" => sub { "DUMMY" },
>
> "month_field" => sub { "DUMMY" },
>
> "number_field" => sub { "DUMMY" },
>
> "param" => sub { "DUMMY" },
>
> "password_field" => sub { "DUMMY" },
>
> "radio_button" => sub { "DUMMY" },
>
> "range_field" => sub { "DUMMY" },
>
> "reply.asset" => sub { "DUMMY" },
>
> "reply.exception" => sub { "DUMMY" },
>
> "reply.not_found" => sub { "DUMMY" },
>
> "reply.static" => sub { "DUMMY" },
>
> "search_field" => sub { "DUMMY" },
>
> "select_field" => sub { "DUMMY" },
>
> "session" => sub { "DUMMY" },
>
> "stash" => sub { "DUMMY" },
>
> "stylesheet" => sub { "DUMMY" },
>
> "submit_button" => sub { "DUMMY" },
>
> "t" => sub { "DUMMY" },
>
> "tag" => $VAR1->{"t"},
>
> "tag_with_error" => sub { "DUMMY" },
>
> "tel_field" => sub { "DUMMY" },
>
> "text_area" => sub { "DUMMY" },
>
> "text_field" => sub { "DUMMY" },
>
> "time_field" => sub { "DUMMY" },
>
> "title" => sub { "DUMMY" },
>
> "ua" => sub { "DUMMY" },
>
> "url_field" => sub { "DUMMY" },
>
> "url_for" => sub { "DUMMY" },
>
> "url_with" => sub { "DUMMY" },
>
> "validation" => sub { "DUMMY" },
>
> "week_field" => sub { "DUMMY" }