NAME

Devel::Agent::Proxy - instance proxy layer

SYNOPSIS

use Devel::Agent::Proxy;

my $self=new SomeClass(...);
my $proxy=new Devel::Agent::Proxy(
  proxy_class_name=>'SomeClass',
  proxied_object=>$self,
);

DESCRIPTION

Devel::Agent::Proxy

This class was created to act as an agent aware wrapper for classes that internals need to be kept of the radar of the agent debugger.

Constructor/Method Accssor

This section documents the constructor methods and class accessors. All constructor arguments are passed by thier name, all class accessors are prefixed with___. For Example wrap_result_methods becomes $self->___wrap_result_methods in an accessor context.

  • wrap_result_methods=>HashRef[CodeRef]

    This is a hashref of code refs that can be used to post process the results of a proxied method.

  • proxy_class_name=>Str

    This should be the name of the class we want the class_method and raw_method to appear as in the agent stack trace.

  • replace_name=>Str

    This is autogenerated as needed, it will be set to $self->___proxy_class_name.'::' on first access.

  • proxied_object=>Object

    This is the object to be proxied.

  • current_method=>Str

    This represents the current method being proxied and is set dynamically at runtime.

  • in_can=>0

    Used by the internals of this object for state.

Object Methods

This section documents the Methods created in this class.

$self->___db_stack_filter($agent,$frame,$args,$raw_caller)

This method is used by some plugin classes for Deve::Agent to handle frame alterations. Basicaly this method is used to re-write a frame in tracing to pevent this object from showing up as iteself and appear as the object it is proxying.

my $cb=$self->can('method')

Overload of UNIVERSAL->can method

if($self->isa("class")) { ... }

Overload of UNIVERSAL->isa("class")

if($self->DOES($object|$class)) { ... }

Overload of UNIVERSAL->DOES($object|$class)

Maybe[Any]=$self->AUTOLOAD(@args)

The guts of how this proxy class works, basically it auto loads methods to look like the object class it is proxying.

Maybe[Any]=$self->___exec_method($cb)

Handles wrapper logic for a given code reference.

AUTHOR

Michael Shipper AKALINUX@CPAN.ORG