Index: Dev/twitter/dump_timeline.pl
===================================================================
--- Dev/twitter/dump_timeline.pl	(revision f1b126ae0a301c7164a1cbc401d79a0e49a5c215)
+++ Dev/twitter/dump_timeline.pl	(revision fe7588333fde0d1dba7162596725ea5f269b68ab)
@@ -16,5 +16,5 @@
 use Encode;
 
-if ($ARGV[0] && ($ARGV[0] eq '--help' || $ARGV[0] eq '-h') ) {
+my $help = sub {
     die <<EOM;
 usage: $0
@@ -27,5 +27,9 @@
     ]
 EOM
+};
+if ($ARGV[0] && ($ARGV[0] eq '--help' || $ARGV[0] eq '-h') ) {
+    &{$help};
 }
+
 my $method = $ARGV[0] || 'user_timeline';
 my $screen_name = $ARGV[1] || '';
@@ -38,10 +42,10 @@
 my $conf = loadconf("$Bin/config.yml");
 if (! defined $conf) {
-    die "$0: cannot parse config file.\n";
+    die "$0: cannot parse config file.";
 }
 
 my $bot = login($conf);
 if (! $bot->authorized) {
-    die "$0: this client is not yet authorized.\n";
+    die "$0: this client is not yet authorized.";
 }
 
@@ -68,5 +72,6 @@
         }
         else {
-            die "$0: unknown method => $method\n";
+            warn "$0: unknown method '$method'";
+            &{$help};
         }
         
@@ -93,5 +98,4 @@
     evalrescue($@);
 }
-print "done\n";
 
 
@@ -106,5 +110,5 @@
     
     if ($!) {
-        warn "$0: '$file' $!\n";
+        warn "$0: '$file' $!";
     }
     
