-
-
31 Jul 2017 21:47:25 UTC
- Distribution: Unexpected
- Module version: v1.0.1
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (1)
- Testers (788 / 0 / 0)
- Kwalitee
Bus factor: 0- 99.47% Coverage
- License: perl_5
- Perl: v5.10.1
- Activity
24 month- Tools
- Download (35.2KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Devel::StackTrace
- Exporter::Tiny
- Module::Runtime
- Moo
- Package::Stash
- Sub::Install
- Type::Tiny
- namespace::autoclean
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
- Name
- Synopsis
- Description
- Configuration and Environment
- Subroutines/Methods
- Diagnostics
- Dependencies
- Incompatibilities
- Bugs and Limitations
- Acknowledgements
- Author
- License and Copyright
Name
Unexpected::TraitFor::ErrorLeader - Prepends a leader to the exception
Synopsis
package MyException; use Moo; extends 'Unexpected'; with 'Unexpected::TraitFor::ErrorLeader';
Description
Prepends a one line stack summary to the exception error message
Configuration and Environment
Requires the
as_string
method in the consuming class, theclone
method from theThrowing
role, as well asframes
from the stack trace roleDefines 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 theleader
attribute to the return valueSubroutines/Methods
ignore
$array_ref = $self->ignore;
Read only accessor for the
$Ignore
package scoped variable. Defaults to an empty array refignore_class
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 refDiagnostics
None
Dependencies
Incompatibilities
There are no known incompatibilities in this module
Bugs and Limitations
There are no known bugs in this module. Please report problems to the address below. Patches are welcome
Acknowledgements
Larry Wall - For the Perl programming language
Author
Peter Flanigan,
<pjfl@cpan.org>
License and Copyright
Copyright (c) 2017 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
Module Install Instructions
To install Unexpected, copy and paste the appropriate command in to your terminal.
cpanm Unexpected
perl -MCPAN -e shell install Unexpected
For more information on module installation, please visit the detailed CPAN module installation guide.