App::ISBN::Check - Base class for isbn-check script.
use App::ISBN::Check; my $app = App::ISBN::Check->new; my $exit_code = $app->run;
new
my $app = App::ISBN::Check->new;
Constructor.
run
my $exit_code = $app->run;
Run.
Returns 1 for error, 0 for success.
new(): From Class::Utils::set_params(): Unknown parameter '%s'.
use strict; use warnings; use App::ISBN::Check; use File::Temp; use IO::Barf qw(barf); # ISBNs for test. my $isbns = <<'END'; 978-80-253-4336-4 9788025343363 9788025343364 978802534336 9656123456 END # Temporary file. my $temp_file = File::Temp->new->filename; # Barf out. barf($temp_file, $isbns); # Arguments. @ARGV = ( $temp_file, ); # Run. exit App::ISBN::Check->new->run; # Output: # 9788025343363: Different after format (978-80-253-4336-4). # 9788025343364: Different after format (978-80-253-4336-4). # 978802534336: Cannot parse. # 9656123456: Not valid.
use strict; use warnings; use App::ISBN::Check; # Arguments. @ARGV = ( -h, ); # Run. exit App::ISBN::Check->new->run; # Output: # Usage: ./print_help.pl [-h] [--version] file_with_isbns # -h Print help. # --version Print version. # file_with_isbns File with ISBN strings, one per line.
Business::ISBN, Class::Utils, Error::Pure, Getopt::Std, Perl6::Slurp.
https://github.com/michal-josef-spacek/App-ISBN-Check
Michal Josef Špaček mailto:skim@cpan.org
http://skim.cz
© 2024 Michal Josef Špaček
BSD 2-Clause License
0.01
To install App::ISBN::Check, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::ISBN::Check
CPAN shell
perl -MCPAN -e shell install App::ISBN::Check
For more information on module installation, please visit the detailed CPAN module installation guide.