Safe::Caller

Safe::Caller is a nicer interface to the built-in caller().
Download

Safe::Caller Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Steven Schubiger
  • Publisher web site:
  • http://search.cpan.org/~schubiger/Safe-Caller-0.06/lib/Safe/Caller.pm

Safe::Caller Tags


Safe::Caller Description

Safe::Caller is a nicer interface to the built-in caller(). Safe::Caller is a nicer interface to the built-in caller().SYNOPSIS package abc; use Safe::Caller; $caller = Safe::Caller->new; a(); sub a { b() } sub b { print $caller->{subroutine}->(); if ($caller->called_from_subroutine('abc::a')) { # do stuff } }CONSTRUCTORnew $caller = Safe::Caller->new(1);Supplying how many frames to go back while running "caller" in perlfunc is optional. By default (if no suitable value is supplied) 1 will be assumed. The default will be shared among all method calls (accessors & verification routines); the accessors may optionally accept a frame as parameter, whereas verification routines (called_from_*()) don't.METHODSAccessors $caller->{package}->(); $caller->{filename}->(); $caller->{line}->(); $caller->{subroutine}->(); $caller->{hasargs}->(); $caller->{wantarray}->(); $caller->{evaltext}->(); $caller->{is_require}->(); $caller->{hints}->(); $caller->{bitmask}->(); Requirements: · Perl


Safe::Caller Related Software