PPI::Exception - The PPI exception base class
use PPI::Exception; my $e = PPI::Exception->new( 'something happened' ); $e->throw; PPI::Exception->new( message => 'something happened' )->throw; PPI::Exception->throw( message => 'something happened' );
All exceptions thrown from within PPI will be instances or derivations of this class.
Constructs and returns a new PPI::Exception object.
PPI::Exception
A message for the exception can be passed, either as a string or as message => $message. The message is available via the message method.
message => $message
message
If called on a PPI::Exception object, throws the object. If called on the class name, uses the arguments to construct a PPI::Exception and then throw it.
Each time the object is thrown, information from the Perl <caller(0)> call is saved and made available via the callers method.
callers
This method never returns.
Returns the exception message passed to the object's constructor, or a default message.
Returns a listref, each element of which is a listref of caller(0) information. The returned listref can be empty.
caller(0)
To install PPI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PPI
CPAN shell
perl -MCPAN -e shell install PPI
For more information on module installation, please visit the detailed CPAN module installation guide.