Data::Object::Role::Proxyable
Data-Object Proxyable Role
use Data::Object::Class; with 'Data::Object::Role::Proxyable'; sub BUILDPROXY { my ($class, $method, @args) = @_; return if $method eq 'execute'; # die with method missing error return sub { time }; # process method call }
Data::Object::Role::Proxyable provides a mechanism for operating on Perl 5 data objects which meet the criteria for being proxyable. This role provides a wrapper around the AUTOLOAD routine which processes calls to routines which don't exist.
This package implements the following methods.
$self->AUTOLOAD($class, $method, @args);
The AUTOLOAD method is called when the object doesn't have the method being called. This method is called and handled automatically.
$self->DESTROY();
The DESTROY method is called when the object goes out of scope. This method is called and handled automatically.
To install Data::Object, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Object
CPAN shell
perl -MCPAN -e shell install Data::Object
For more information on module installation, please visit the detailed CPAN module installation guide.