The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Data::Object::Role::Proxyable

ABSTRACT

Data-Object Proxyable Role

SYNOPSIS

  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

  }

DESCRIPTION

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.

METHODS

This package implements the following methods.

autoload

  $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.

destroy

  $self->DESTROY();

The DESTROY method is called when the object goes out of scope. This method is called and handled automatically.