X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fhomebank2ledger;a=blobdiff_plain;f=lib%2FApp%2FHomeBank2Ledger.pm;h=655ba9b7b9059a482735d685ca6924842d537892;hp=13cb9d2f57f4837a4ec9be41d4e224ca792039de;hb=661b30e1693328acbd3aa6730777a0568738b55b;hpb=71591e40fa4a522e41ed7283cce39780f4ef8cb5 diff --git a/lib/App/HomeBank2Ledger.pm b/lib/App/HomeBank2Ledger.pm index 13cb9d2..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.001'; # 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.001 +version 0.003 =head1 SYNOPSIS