Skip to content

Commit

Permalink
added ojo recipe to cookbook
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Apr 2, 2012
1 parent f5c22db commit 5bdcf94
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
11 changes: 9 additions & 2 deletions lib/Mojolicious/Guides/Cookbook.pod
Expand Up @@ -977,6 +977,13 @@ This can be an invaluable tool for testing your applications.

$ ./myapp.pl get /welcome 'head > title'

=head2 Oneliner

For quick hacks and especially testing, L<ojo> oneliners are also a great
choice.

$ perl -Mojo -E'say g("mojolicio.us")->dom->html->head->title->text'

=head1 HACKS

Fun hacks you might not use very often but that might come in handy some day.
Expand Down Expand Up @@ -1115,11 +1122,11 @@ response.
The C<Hello World> example above can get even a little bit shorter in an
L<ojo> oneliner.

$ perl -Mojo -e'a({text => "Hello World!"})->start' daemon
$ perl -Mojo -E'a({text => "Hello World!"})->start' daemon

And you can use all the commands from L<Mojolicious::Commands>.

$ perl -Mojo -e'a({text => "Hello World!"})->start' get -v /
$ perl -Mojo -E'a({text => "Hello World!"})->start' get -v /

=head1 MORE

Expand Down
12 changes: 6 additions & 6 deletions lib/Mojolicious/Guides/FAQ.pod
Expand Up @@ -45,12 +45,12 @@ criteria.
=head2 What about backwards compatibility?

In conformance with L<Mojolicious::Guides::CodingGuidelines>, we will always
deprecate a feature before removing or changing it in incompatible ways. New
features can however be marked as experimental to explicitly exclude them
from these rules. This gives us the necessary freedom to ensure a healthy
future for L<Mojolicious>. So, as long as you are not using anything marked
experimental, untested or undocumented, you can always count on backwards
compatibility, everything else would be considered a bug.
deprecate a feature before removing or changing it in incompatible ways
between major releases. New features can however be marked as experimental to
explicitly exclude them from these rules. This gives us the necessary freedom
to ensure a healthy future for L<Mojolicious>. So, as long as you are not
using anything marked experimental, untested or undocumented, you can always
count on backwards compatibility, everything else would be considered a bug.

=head2 Why not split up Mojolicious into many smaller distributions?

Expand Down

0 comments on commit 5bdcf94

Please sign in to comment.