Carp::Perror - print msg then exit
use Carp::Perror qw/perror pexit/; pexit(1, "wrong argv given\n"); # got "wrong argv given", exit code = 1; pexit("wrong argv given\n"); # got "wrong argv given", exit code = 0; perror(1, "wrong argv given\n"); # got "wrong argv given", exit code = 1; perror("wrong argv given\n"); # got "wrong argv given", exit code = 0;
Exit without any stack backtrace msg.
None by default.
exit with defined exit code if the first argv is a number.
else exit with 0.
just a alias of pexit().
Carp
Chen Gang, <yikuyiku.com@google.com>
Copyright (C) 2014 by Chen Gang
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.16.2 or, at your option, any later version of Perl 5 you may have available.
To install Carp::Perror, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Carp::Perror
CPAN shell
perl -MCPAN -e shell install Carp::Perror
For more information on module installation, please visit the detailed CPAN module installation guide.