X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fhomebank2ledger;a=blobdiff_plain;f=lib%2FApp%2FHomeBank2Ledger.pm;h=655ba9b7b9059a482735d685ca6924842d537892;hp=64cb0307483540b3b9d131a4b28ee8ab44c0f67d;hb=661b30e1693328acbd3aa6730777a0568738b55b;hpb=185d2cc01e85fc41bd14b06a0b1290c2e25a874a diff --git a/lib/App/HomeBank2Ledger.pm b/lib/App/HomeBank2Ledger.pm index 64cb030..655ba9b 100644 --- a/lib/App/HomeBank2Ledger.pm +++ b/lib/App/HomeBank2Ledger.pm @@ -11,7 +11,7 @@ use File::HomeBank; use Getopt::Long 2.38 qw(GetOptionsFromArray); use Pod::Usage; -our $VERSION = '0.002'; # VERSION +our $VERSION = '0.003'; # VERSION my %ACCOUNT_TYPES = ( # map HomeBank account types to Ledger accounts bank => 'Assets:Bank', @@ -50,6 +50,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}); @@ -355,10 +359,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; } @@ -382,7 +382,7 @@ App::HomeBank2Ledger - A tool to convert HomeBank files to Ledger format =head1 VERSION -version 0.002 +version 0.003 =head1 SYNOPSIS