Hook::Scope

Hook::Scope is a Perl extension for adding hooks for exiting a scope.
Download

Hook::Scope Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Arthur Bergman
  • Publisher web site:
  • http://search.cpan.org/~abergman/Hook-Scope-0.04/Scope.pm

Hook::Scope Tags


Hook::Scope Description

Hook::Scope is a Perl extension for adding hooks for exiting a scope. Hook::Scope is a Perl extension for adding hooks for exiting a scope.SYNOPSIS use Hook::Scope; { Hook::Scope::POST(sub { print "I just left my scope"}); print "you will see this first!"; } use Hook::Scope qw(POST PRE); # only POST can be exported { POST { print "foo" }; POST sub { print "bar"}; # can have multiple POSTs, last added, first run PRE { print "this runs first" }; }ABSTRACTThis module allows you to register subroutines to be executed when the scope they were registered in, has been left.POSTPOST takes a reference to a subroutine or a subroutine name and will register that subroutine to be executed when the scope is left. Note that even if the scope is left using die(), the subroutine will be executed. Requirements: · Perl


Hook::Scope Related Software