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

NAME

Devel::CallerStack::Level - Element in a CallerStack, represents a single caller level.

SYNOPSIS

    my $level = Devel::CallerStack::Level->new( $depth );

    my $package = $caller->package;

    if ( $caller->package( $check )) {
        ...
    }

CONSTRUCTOR

$level = Devel::CallerStack::Level->new( $depth )

Create a n instance representing the caller at $depth.

ACCESSOR-CHECKERS

Accessors are read only. When called without an argument the value will be returned. If there is an argument it will be treated as a check and return true or false. A check can be a scalar, a regex, or a coderef. In the case of a coderef, the value will be passed in as the only argument.

$level->package()
$level->filename()
$level->line()
$level->subroutine()
$level->hasargs()
$level->wantarray()
$level->evaltext()
$level->is_require()
$level->hints()
$level->bitmask()
$level->hinthash()
$arrayref = $level->args()

The list of args is not to be trusted. See http://perldoc.perl.org/functions/caller.html for caveats of caller args. DO NOT MODIFY ANYTHING IN THE ARGS LIST

EXTENDED CHECK

$bool = $level->check_ordered( @checks )

Check each attribute in order against the check at the same index, undefinded indexes in @check will not be checked. True if all checks are true.

AUTHORS

Chad Granum exodist7@gmail.com

COPYRIGHT

Copyright (C) 2010 Chad Granum

Devel-CallerStack is free software; Standard perl licence.

Devel-CallerStack is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license for more details.