Manual Reference Pages - SPECIO::DECLAREDAT (3)
Specio::DeclaredAt - A class to represent where a type or coercion was declared
my $declared = Specio::DeclaredAt->new_from_caller(1);
This class provides a thin wrapper around some of the return values from
Perls caller() built-in. Its used internally to identify where types and
coercions are being declared, which is useful when generating error messages.
This class provides the following methods.
Given a call stack depth, this method returns a new Specio::DeclaredAt
CW$declared_at->package(), CW$declared_at->filename(), CW$declared_at->line()
Returns the call stack information recorded when the object was created. These
values are always populated.
Returns the subroutine from the call stack. This may be an udnef
Returns true if there is a subroutine name associated with this object.
Puts all the information together into a single string like declared in
package Foo::Bar (.../Foo/Bar.pm) at line 42 in sub named blah.
Dave Rolsky <email@example.com>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2015 by Dave Rolsky.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
|perl v5.20.3 ||SPECIO::DECLAREDAT (3) ||2015-12-19 |
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.