Skip to content

Commit

Permalink
simplify cpanify command a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 18, 2012
1 parent 27c7160 commit f7f5784
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/Mojolicious/Command/cpanify.pm
Expand Up @@ -22,18 +22,15 @@ sub run {

# Options
local @ARGV = @_;
my $password = my $user = '';
my ($password, $user) = '';
GetOptions(
'p|password=s' => sub { $password = $_[1] },
'u|user=s' => sub { $user = $_[1] }
);
my $file = shift @ARGV;
die $self->usage unless $file;
die $self->usage unless my $file = shift @ARGV;

# Upload
my $ua = Mojo::UserAgent->new;
$ua->detect_proxy;
my $tx = $ua->post_form(
my $tx = Mojo::UserAgent->new->detect_proxy->post_form(
"https://$user:$password\@pause.perl.org/pause/authenquery" => {
HIDDENNAME => $user,
CAN_MULTIPART => 1,
Expand Down

0 comments on commit f7f5784

Please sign in to comment.