projects
/
lab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
90f8850
)
FIX: print error message causes error
author
Ken-ichi Mito
<mitty@mitty.jp>
Fri, 12 Jul 2013 14:37:54 +0000
(23:37 +0900)
committer
Ken-ichi Mito
<mitty@mitty.jp>
Fri, 12 Jul 2013 14:37:54 +0000
(23:37 +0900)
* Net::Twitter::Lite::Error->twitter_error->{errors} is sometimes simple string
Dev/twitter/twitterbot.pl
patch
|
blob
|
history
diff --git
a/Dev/twitter/twitterbot.pl
b/Dev/twitter/twitterbot.pl
index
4606d95
..
a4ead6b
100755
(executable)
--- a/
Dev/twitter/twitterbot.pl
+++ b/
Dev/twitter/twitterbot.pl
@@
-302,7
+302,7
@@
sub evalrescue {
warn $@->error;
if ($@->twitter_error) {
my $twitter_error = $@->twitter_error;
- if (defined $twitter_error->{errors}) {
+ if (defined $twitter_error->{errors} && ref($twitter_error->{errors})) {
foreach my $error (@{$twitter_error->{errors}}) {
warn "code => " , $error->{code}, "\n";
warn "message => ", $error->{message}, "\n";