X-Git-Url: http://lab.mitty.jp/git/?a=blobdiff_plain;f=Dev%2Ftwitter%2Ftwitterbot.pl;h=ae37ea6210a927720a04319aa69d7b844a6f8dfb;hb=52c76fd42f32a43fdb145980161126a4e7503065;hp=f9dea40084f8a0d6617f48e2d8efd1f9dd75db84;hpb=45a20c35b7f63730b2bd6d7253d7b9aa07df68c2;p=lab.git diff --git a/Dev/twitter/twitterbot.pl b/Dev/twitter/twitterbot.pl index f9dea40..ae37ea6 100755 --- a/Dev/twitter/twitterbot.pl +++ b/Dev/twitter/twitterbot.pl @@ -106,6 +106,7 @@ foreach my $id (sort keys %$tweets) { } if ($skip) { + $stat->{$tweets->{$id}{type}} = $id; next; } @@ -142,7 +143,7 @@ if ($conf->{mail}{body}) { DEBUG or sendmail(%mail) or warn "Error sending mail: $Mail::Sendmail::error\n"; } -if ($tweets) { +if (ref $tweets and keys %{$tweets}) { # save last status to yaml file DEBUG or YAML::Tiny::DumpFile("$Bin/status.yml", $stat); DEBUG and warn "status.yml => ", Dumper($stat);