fix bug making --version, --help flags unusable
authorCharles McGarvey <chazmcgarvey@brokenzipper.com>
Thu, 13 Jun 2019 08:54:36 +0000 (02:54 -0600)
committerCharles McGarvey <chazmcgarvey@brokenzipper.com>
Thu, 13 Jun 2019 08:54:36 +0000 (02:54 -0600)
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.024154 seconds and 4 git commands to generate.