Unexpected::TraitFor::ErrorLeader - Prepends a leader to the exception
package MyException; use Moo; extends 'Unexpected'; with 'Unexpected::TraitFor::ErrorLeader';
Prepends a one line stack summary to the exception error message
Requires the as_string method in the consuming class, as well as frames from the stack trace role
as_string
frames
Defines the following attributes;
leader
Set to the package and line number where the error should be reported
level
A positive integer which defaults to one. How many additional stack frames to pop before calculating the leader attribute
Modifies as_string in the consuming class. Prepends the leader attribute to the return value
$array_ref = $self->ignore;
Read only accessor for the $Ignore package scoped variable. Defaults to an empty array ref
$Ignore
Unexpected->ignore_class( $classname );
The $Ignore package scoped variable is an array ref of methods whose presence should be ignored by the error message leader. This method pushes $classname onto that array ref
$classname
None
There are no known incompatibilities in this module
There are no known bugs in this module. Please report problems to the address below. Patches are welcome
Larry Wall - For the Perl programming language
Peter Flanigan, <pjfl@cpan.org>
<pjfl@cpan.org>
Copyright (c) 2014 Peter Flanigan. All rights reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic
This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
To install Unexpected, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Unexpected
CPAN shell
perl -MCPAN -e shell install Unexpected
For more information on module installation, please visit the detailed CPAN module installation guide.