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

  AUTOLOAD(Str $arg1, Str $arg2, Any @args) : Any

The AUTOLOAD method is called when the object doesn't have the method being called. This method is called and handled automatically.

AUTOLOAD example
  $self->AUTOLOAD($class, $method, @args);

destroy

  DESTROY() : Any

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

DESTROY example
  $self->DESTROY();