Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
use less loops
  • Loading branch information
kraih committed Sep 21, 2014
1 parent 49f505b commit 9901f89
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/Mojolicious/Command/get.pm
Expand Up @@ -29,8 +29,7 @@ sub run {
my $selector = shift @args;

# Parse header pairs
my %headers;
/^\s*([^:]+)\s*:\s*(.+)$/ and $headers{$1} = $2 for @headers;
my %headers = map { /^\s*([^:]+)\s*:\s*(.+)$/ ? ($1, $2) : () } @headers;

# Detect proxy for absolute URLs
my $ua = Mojo::UserAgent->new(ioloop => Mojo::IOLoop->singleton);
Expand Down

0 comments on commit 9901f89

Please sign in to comment.