Changeset d9a45a4 in lab.git for Dev/twitter/twitterbot.pl


Ignore:
Timestamp:
Jul 12, 2013 11:37:54 PM (11 years ago)
Author:
Ken-ichi Mito <mitty@…>
Branches:
master
Children:
6a2e5f1
Parents:
90f8850
Message:

FIX: print error message causes error

  • Net::Twitter::Lite::Error->twitter_error->{errors} is sometimes simple string
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Dev/twitter/twitterbot.pl

    r90f8850 rd9a45a4  
    303303        if ($@->twitter_error) { 
    304304            my $twitter_error = $@->twitter_error; 
    305             if (defined $twitter_error->{errors}) { 
     305            if (defined $twitter_error->{errors} && ref($twitter_error->{errors})) { 
    306306                foreach my $error (@{$twitter_error->{errors}}) { 
    307307                    warn "code => "   , $error->{code}, "\n"; 
Note: See TracChangeset for help on using the changeset viewer.