GX::Callback::Method - Method-based callback class
# Load the class use GX::Callback::Method; # Create a new callback object $callback = GX::Callback::Method->new( invocant => MyApp::View::XML->instance, method => 'render' ); # Execute the callback $callback->call( context => $context );
This module provides the GX::Callback::Method class which extends the GX::Callback class.
new
Returns a new GX::Callback::Method object.
$callback = GX::Callback::Method->new( %attributes );
arguments ( ARRAY reference )
arguments
ARRAY
A reference to an array with arguments to pass to the callback method when it is called.
invocant ( string | object ) [ required ]
invocant
The invocant, which can be either a class name or an object.
method ( string ) [ required ]
method
The name of the callback method.
$callback ( GX::Callback::Method object )
$callback
GX::Exception
Returns the callback method arguments.
@arguments = $callback->arguments;
@arguments ( scalars )
@arguments
call
Calls the callback method.
$callback->call( @arguments );
Additional arguments to pass to the callback method.
code
Returns a reference to the callback method.
$code = $callback->code;
$code ( CODE reference )
$code
CODE
Returns the invocant.
$invocant = $callback->invocant;
$invocant ( string | object )
$invocant
Returns the name of the callback method.
$method = $callback->method;
$method ( string )
$method
Jörg A. Uzarek <uzarek@runlevelnull.de>
Copyright (c) 2009-2011 Jörg A. Uzarek.
This module is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License Version 3 as published by the Free Software Foundation.
To install GX, copy and paste the appropriate command in to your terminal.
cpanm
cpanm GX
CPAN shell
perl -MCPAN -e shell install GX
For more information on module installation, please visit the detailed CPAN module installation guide.