Fix for deprecated mojo function

This commit is contained in:
Joe Ferguson 2015-07-29 13:03:21 -07:00
parent d571c6ee72
commit 74056bfc7e
1 changed files with 2 additions and 2 deletions

View File

@ -159,7 +159,7 @@ $login = $ua->post($login->req->url->to_abs => {
die 'login failed' unless $login->success; die 'login failed' unless $login->success;
my $error = $login->res->dom('.alert-error'); my $error = $login->res->dom('.alert-error');
if ($error->size) { if ($error->size) {
die $error->pluck('all_text')->join("\n") . "\n"; die $error->map(sub { $_->all_text })->join("\n") . "\n";
} }
while (my $repo = shift) { # '/_/hylang', '/u/tianon/perl', etc while (my $repo = shift) { # '/_/hylang', '/u/tianon/perl', etc
@ -193,7 +193,7 @@ while (my $repo = shift) { # '/_/hylang', '/u/tianon/perl', etc
my $alert = $repoTx->res->dom('.alert-error'); my $alert = $repoTx->res->dom('.alert-error');
if ($alert->size) { if ($alert->size) {
my $text = trim $alert->pluck('all_text'); my $text = trim $alert->map(sub { $_->all_text })->join("\n");
die 'update to ' . $repoUrl . ' failed:' . "\n" . $text if $text; die 'update to ' . $repoUrl . ' failed:' . "\n" . $text if $text;
} }
} }