Error::Pure::Utils - Utilities for structured errors.
use Error::Pure::Utils qw(clean err_get err_helper); clean(); my @errors = err_get(1); my @errors = err_helper('This is a fatal error', 'name', 'value');
Resets internal variables with errors. Is exportable.
Get and clean processed errors. err_get() returns error structure. err_get(1) returns error structure and delete it internally. Returns array of errors. Is exportable.
Subroutine for additional module above Error::Pure. @msg is array of messages. Returns array of errors. Is exportable.
Default value is 2.
Default value is 50.
Default value is 100.
Default value is 10.
Program name in stack information. Default value is ''.
# Pragmas. use strict; use warnings; # Modules. use Dumpvalue; use Error::Pure::Die qw(err); use Error::Pure::Utils qw(err_get); # Error in eval. eval { err '1', '2', '3'; }; # Error structure. my @err = err_get(); # Dump. my $dump = Dumpvalue->new; $dump->dumpValues(\@err); # In \@err: # [ # { # 'msg' => [ # '1', # '2', # '3', # ], # 'stack' => [ # { # 'args' => '(1)', # 'class' => 'main', # 'line' => '9', # 'prog' => 'script.pl', # 'sub' => 'err', # }, # { # 'args' => '', # 'class' => 'main', # 'line' => '9', # 'prog' => 'script.pl', # 'sub' => 'eval {...}', # }, # ], # }, # ],
Cwd, Exporter, Readonly.
Error::Pure, Error::Pure::AllError, Error::Pure::Error, Error::Pure::ErrorList, Error::Pure::HTTP::AllError, Error::Pure::HTTP::Error, Error::Pure::HTTP::ErrorList, Error::Pure::HTTP::Print, Error::Pure::Output::Text, Error::Pure::Print.
https://github.com/tupinek/Error-Pure
Michal Špaček mailto:skim@cpan.org
http://skim.cz
BSD license.
0.11
To install Error::Pure, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Error::Pure
CPAN shell
perl -MCPAN -e shell install Error::Pure
For more information on module installation, please visit the detailed CPAN module installation guide.