From 40a676b7222ed578faa199dc285e9310e92deaf8 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sat, 11 May 2019 16:53:57 +0200 Subject: [PATCH] debug api requests given on command line --- getsc2clan | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/getsc2clan b/getsc2clan index b1a5ebd..3285535 100755 --- 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 ... [...]\n"; my ($clanmatch) = map { $_ && qr/\A(?:$_)\z/i } join '|', @{$clanmatches}; -- 2.30.0