projects
/
lab.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* FIX: warning 'Use of uninitialized value $ARGV[0]' on non debug mode
[lab.git]
/
twitter
/
twitterbot.pl
diff --git
a/twitter/twitterbot.pl
b/twitter/twitterbot.pl
index
7da7ec8
..
eb9079d
100755
(executable)
--- a/
twitter/twitterbot.pl
+++ b/
twitter/twitterbot.pl
@@
-14,8
+14,9
@@
use FindBin qw($Bin);
use YAML::Tiny;
use Date::Parse qw(str2time);
use YAML::Tiny;
use Date::Parse qw(str2time);
-sub VERBOSE () { $ARGV[0] eq 'verbose' };
-sub DEBUG () { VERBOSE or $ARGV[0] eq 'debug' };
+my $_execmode = $ARGV[0] || 0;
+sub VERBOSE () { $_execmode eq 'verbose' };
+sub DEBUG () { VERBOSE or $_execmode eq 'debug' };
use Data::Dumper;
DEBUG and warn "$0: debug mode";
use Data::Dumper;
DEBUG and warn "$0: debug mode";