Changeset 33e956f in lab.git


Ignore:
Timestamp:
Sep 13, 2010 9:32:55 PM (14 years ago)
Author:
mitty <mitty@…>
Branches:
twitter-0.1, twitter-0.1@65, twitter-0.1@66
Children:
abaa39c
Parents:
5f2d507
Message:
  • skip unimportant elements from the Dump

git-svn-id: https://lab.mitty.jp/svn/lab/trunk/twitter@51 7d2118f6-f56c-43e7-95a2-4bb3031d96e7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • show_status.pl

    r5f2d507 r33e956f  
    2929        my $res = $bot->show_status($id); 
    3030        use Data::Dumper; 
    31         print Dumper $res; 
     31        foreach my $line (split /\n/, Dumper $res) { 
     32            if ($line =~ /undef/) { next; } 
     33            unless ($line =~ / => {/ 
     34                ||  $line =~ / = / 
     35                ||  $line =~ /status/ 
     36                ||  $line =~ /'text'/ 
     37                ||  $line =~ /created/ 
     38                ||  $line =~ /'id'/ 
     39                ||  $line =~ /name/ 
     40                ||  $line =~ / },/ 
     41                ||  $line =~ / };/ 
     42            ) { next; } 
     43            print $line, "\n"; 
     44        } 
    3245    } 
    3346}; 
Note: See TracChangeset for help on using the changeset viewer.