Jeffrey Ray Hallock > Gapp-App-0.007 > Gapp::App::Hook

Download:
Gapp-App-0.007.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.007   Source  

NAME ^

Gapp::App::Hook - Application callback

DESCRIPTION ^

A hook object holds callbacks which are executed upon request.

PROVIDED ATTRIBUTES ^

action

Possible values are aggregate and halt. An Aggregate hook will accumlate the return values of all callbacks. A halt hook will stop execution of all callbacks when any callback returns true.

is rw
isa GappAppHookAction
default aggregate
name

The name of the hook.

is rw
isa Str
closure \&callback

A CodeRef to be executed after all callbacks.

is rw
isa CodeRef|Undef
default Undef

PROVIDED METHODS ^

call @params

Executes the associated callbacks, passing in @params.

push \&callback, $data

Add a callback to the hook. Callbacks will be executed in the order they are pushed on to the stack.

AUTHORS ^

Jeffrey Ray Hallock <jeffrey.hallock at gmail dot com>

COPYRIGHT & LICENSE ^

Copyright (c) 2010-2012 Jeffrey Ray Hallock.

    This is free software, licensed under:

    The Artistic License 2.0 (GPL Compatible)
syntax highlighting: