From d20663fe364a824f07b46882cfde798f108f27f6 Mon Sep 17 00:00:00 2001 From: Dan Boger Date: Thu, 28 Jan 2010 15:09:30 -0800 Subject: [PATCH 1/1] Make sure we don't try to print to an undefined filehandle, if there's an error when loading the initial friends list --- twirssi.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/twirssi.pl b/twirssi.pl index c133378..64c344f 100644 --- a/twirssi.pl +++ b/twirssi.pl @@ -524,7 +524,7 @@ sub cmd_login { ); } else { $twit = Net::Twitter->new( - traits => [ 'API::REST', 'OAuth', 'API::Search' ], + traits => [ 'API::REST', 'OAuth', 'API::Search' ], consumer_key => 'BZVAvBma4GxdiRwXIvbnw', consumer_secret => '0T5kahwLyb34vciGZsgkA9lsjtGCQ05vxVE2APXM', @@ -955,7 +955,8 @@ sub load_friends { }; if ($@) { - print $fh "type:debug Error during friends list update. Aborted.\n"; + print $fh "type:debug Error during friends list update. Aborted.\n" + if $fh; return; } -- 2.39.5