]> Dogcows Code - chaz/homebank2ledger/blobdiff - lib/App/HomeBank2Ledger.pm
fix bug making --version, --help flags unusable
[chaz/homebank2ledger] / lib / App / HomeBank2Ledger.pm
index 2075bd80e2227547b41cde202b2a7b62f0f120f0..e152a7ef8b5818a48b38518f71c1f12dbe322aa4 100644 (file)
@@ -66,6 +66,10 @@ sub main {
     if ($opts->{manual}) {
         pod2usage(-exitval => 0, -verbose => 2);
     }
+    if (!$opts->{input}) {
+        print STDERR "Input file is required.\n";
+        exit(1);
+    }
 
     my $homebank = File::HomeBank->new(file => $opts->{input});
 
@@ -400,10 +404,6 @@ sub parse_args {
     ) or pod2usage(-exitval => 1, -verbose => 99, -sections => [qw(SYNOPSIS OPTIONS)]);
 
     $opts{input} = shift @args if !$opts{input};
-    if (!$opts{input}) {
-        print STDERR "Input file is required.\n";
-        exit(1);
-    }
 
     return \%opts;
 }
This page took 0.020702 seconds and 4 git commands to generate.