Skip to content

Commit

Permalink
fixed Morbo example
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 18, 2014
1 parent 9c0ca75 commit f00a449
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/Mojo/UserAgent.pm
Expand Up @@ -407,14 +407,14 @@ Mojo::UserAgent - Non-blocking I/O HTTP and WebSocket user agent
# Extract data from HTML and XML resources
say $ua->get('www.perl.org')->res->dom->html->head->title->text;
# Scrape the latest headlines from a news site
# Scrape the latest headlines from a news site with CSS selectors
say $ua->get('perlnews.org')->res->dom('h2 > a')->text->shuffle;
# IPv6 PUT request with content
my $tx
= $ua->put('[::1]:3000' => {'Content-Type' => 'text/plain'} => 'Hello!');
# Grab the latest Mojolicious release :)
# Follow redirects to grab the latest Mojolicious release :)
$ua->max_redirects(5)->get('latest.mojolicio.us')
->res->content->asset->move_to('/Users/sri/mojo.tar.gz');
Expand Down
4 changes: 2 additions & 2 deletions script/morbo
Expand Up @@ -20,7 +20,7 @@ usage: $0 [OPTIONS] [APPLICATION]
morbo script/myapp
morbo myapp.pl
morbo -m production -l https://*:443 -l http://[::]:3000
morbo -m production -l https://*:443 -l http://[::]:3000 myapp.pl
morbo -w /usr/local/lib -w public myapp.pl
These options are available:
Expand All @@ -39,7 +39,7 @@ These options are available:
directories in the current working directory.
EOF

$ENV{MOJO_LISTEN} = join(',', @listen) if @listen;
$ENV{MOJO_LISTEN} = join ',', @listen if @listen;
require Mojo::Server::Morbo;
my $morbo = Mojo::Server::Morbo->new;
$morbo->watch(\@watch) if @watch;
Expand Down

0 comments on commit f00a449

Please sign in to comment.