improve error messages of failed password include
authorMischa POSLAWSKY <perl@shiar.org>
Thu, 6 Jun 2019 16:44:03 +0000 (18:44 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Thu, 6 Jun 2019 16:45:00 +0000 (18:45 +0200)
getsc2clan

index c3730517d6a7219a3d3e4447e8bfa475b465c515..1fbdd02ee3ada748cd8ac69992f2f408d11cfa89 100755 (executable)
@@ -20,7 +20,9 @@ my ($clanmatch) = map { $_ && qr/\A(?:$_)\z/i } join '|', @{$clanmatches || []};
 
 sub blizget {
        state $bliz = do {
-               my %auth = do './.blizzard.passwd.pl' or die "no auth setup: $!\n";
+               my @authdata = do './.blizzard.passwd.pl' and not $@ || $!
+                       or die "No auth setup: ", $@ || $!, "\n";
+               my %auth = @authdata;
                my $bliz = LWP::Authen::OAuth2->new(%auth,
                        token_endpoint          => 'https://eu.battle.net/oauth/token',
                        request_required_params => [qw( client_id client_secret grant_type )],