The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Error::Pure::Die - Error::Pure module with classic die.

SYNOPSIS

 use Error::Pure::Die qw(err);
 err 'This is a fatal error', 'name', 'value';

SUBROUTINES

err(@messages)
 Process error with messages @messages.

EXAMPLE1

 # Pragmas.
 use strict;
 use warnings;

 # Modules.
 use Error::Pure::Die qw(err);

 # Error.
 err '1';

 # Output:
 # 1 at example1.pl line 9.

EXAMPLE2

 # Pragmas.
 use strict;
 use warnings;

 # Modules.
 use Error::Pure::Die qw(err);

 # Error.
 err '1', '2', '3';

 # Output:
 # 1 at example2.pl line 9.

EXAMPLE3

 # 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 {...}',
 #                         },
 #                 ],
 #         },
 # ],

DEPENDENCIES

Exporter, List::MoreUtils, Readonly.

SEE ALSO

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.

REPOSITORY

https://github.com/tupinek/Error-Pure

AUTHOR

Michal Špaček mailto:skim@cpan.org

http://skim.cz

LICENSE AND COPYRIGHT

BSD license.

VERSION

0.11