Skip to content

Commit

Permalink
better option examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 7, 2012
1 parent e189c42 commit d9aa0e8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/Mojolicious/Command/get.pm
Expand Up @@ -19,8 +19,8 @@ usage: $0 get [OPTIONS] URL [SELECTOR|JSON-POINTER] [COMMANDS]
mojo get /
mojo get mojolicio.us
mojo get -v -r google.com
mojo get --method POST --content 'trololo' mojolicio.us
mojo get --header 'X-Bender: Bite my shiny metal ass!' mojolicio.us
mojo get -M POST -c 'trololo' mojolicio.us
mojo get -H 'X-Bender: Bite my shiny metal ass!' mojolicio.us
mojo get mojolicio.us 'head > title' text
mojo get mojolicio.us .footer all
mojo get mojolicio.us a attr href
Expand Down
8 changes: 4 additions & 4 deletions lib/Mojolicious/Guides/Cookbook.pod
Expand Up @@ -29,7 +29,7 @@ Perl works on.

Another huge advantage is that it supports TLS and WebSockets out of the box.

$ ./script/myapp daemon --listen https://*:3000
$ ./script/myapp daemon -l https://*:3000
Server available at https://127.0.0.1:3000.

A development certificate for testing purposes is built right in, so it just
Expand Down Expand Up @@ -626,12 +626,12 @@ You can also extract all text from nested child elements.

The request can be customized as well.

$ mojo get --method POST --content 'Hello!' http://mojolicio.us
$ mojo get --header 'X-Bender: Bite my shiny metal ass!' http://google.com
$ mojo get -M POST -c 'Hello!' http://mojolicio.us
$ mojo get -H 'X-Bender: Bite my shiny metal ass!' http://google.com

You can follow redirects and view the headers for all messages.

$ mojo get --redirect --verbose http://reddit.com 'head > title'
$ mojo get -r -v http://reddit.com 'head > title'

Extract just the information you really need from JSON data structures.

Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Lite.pm
Expand Up @@ -130,7 +130,7 @@ just work without commands.
$ ./myapp.pl daemon
Server available at http://127.0.0.1:3000.
$ ./myapp.pl daemon --listen http://*:8080
$ ./myapp.pl daemon -l http://*:8080
Server available at http://127.0.0.1:8080.
$ ./myapp.pl cgi
Expand Down
1 change: 1 addition & 0 deletions script/hypnotoad
Expand Up @@ -37,6 +37,7 @@ usage: $0 [OPTIONS] [APPLICATION]
hypnotoad script/myapp
hypnotoad myapp.pl
hypnotoad -f myapp.pl
These options are available:
-c, --config <path> Configuration file, defaults to "hypnotoad.conf" in
Expand Down

0 comments on commit d9aa0e8

Please sign in to comment.