Changeset 035465b in lab.git


Ignore:
Timestamp:
Sep 13, 2010 9:32:55 PM (14 years ago)
Author:
mitty <mitty@…>
Branches:
master, trunk
Children:
35889d4
Parents:
4e0b0a1
Message:
  • skip unimportant elements from the Dump

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • twitter/show_status.pl

    r4e0b0a1 r035465b  
    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.