From b9060c88e64ce10e6c11cdb9c3a5552c91640aaa Mon Sep 17 00:00:00 2001 From: mitty Date: Mon, 10 Jan 2011 10:35:17 +0000 Subject: [PATCH] * save status.yml only when new tweets were found git-svn-id: https://lab.mitty.jp/svn/lab/trunk@106 7d2118f6-f56c-43e7-95a2-4bb3031d96e7 --- Dev/twitter/twitterbot.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dev/twitter/twitterbot.pl b/Dev/twitter/twitterbot.pl index 3923a6b..ae37ea6 100755 --- a/Dev/twitter/twitterbot.pl +++ b/Dev/twitter/twitterbot.pl @@ -143,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); -- 1.7.9.5