git.shiar.nl
/
sc2-widget
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
5ef3c50
)
debug api requests given on command line
v0.3
author
Mischa POSLAWSKY
<perl@shiar.org>
Sat, 11 May 2019 14:53:57 +0000
(16:53 +0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Sat, 11 May 2019 15:03:01 +0000
(17:03 +0200)
getsc2clan
patch
|
blob
|
history
diff --git
a/getsc2clan
b/getsc2clan
index b1a5ebdcc25085ad749d13b0ba9acbdd2a5ee048..328553523d7b6834281c05b2a5a26afa0c3fa49b 100755
(executable)
--- a/
getsc2clan
+++ b/
getsc2clan
@@
-8,8
+8,13
@@
use LWP::Authen::OAuth2;
use JSON qw( decode_json );
use List::MoreUtils qw( all part nsort_by );
+if (@ARGV and all { m[/] } @ARGV) {
+ say pp blizget($_) for @ARGV;
+ exit;
+}
+
my ($profiles, $clanmatches) = part { /\D/ } @ARGV; # separate numbers
-@{$profiles}
+
$profiles &&
@{$profiles}
or die "Usage: $0 <profile id>... [<clan name>...]\n";
my ($clanmatch) = map { $_ && qr/\A(?:$_)\z/i } join '|', @{$clanmatches};