IOC::Proxy

IOC::Proxy is a proxy for the IOC framework.
Download

IOC::Proxy Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Stevan Little
  • Publisher web site:
  • http://search.cpan.org/~stevan/Devel-StrictObjectHash-0.01/lib/Devel/StrictObjectHash.pm

IOC::Proxy Tags


IOC::Proxy Description

IOC::Proxy is a proxy for the IOC framework. IOC::Proxy is a proxy for the IOC framework.SYNOPSIS use IOC::Proxy; my $proxy_server = IOC::Proxy->new({ on_method_call => sub { my ($proxy_server, $method_name, $method_full_name, $current_method_args) = @_; warn ("Method '$method_name' called with args (" . (join ", " => @{$current_method_args}) . "), now passing call to '$method_full_name'"); } }); $proxy_server->wrap($object); # this now wraps the $object in a special proxy package # which will intercept all it's calls, while still # behaving exactly as if it was not proxied $object->method(); # this will warn: # Method 'method' called with args (Class::_::Proxy=HASH(0x859978)), now passing call to 'Class::method'This module is a base class for all your IOC::Proxy needs. It can be used on it's own or it can be subclassed.The basic idea of the IOC::Proxy is that since we are using the IOC framework to create our object instances, we can do certain things to those instances which we would not easily be able to do otherwise. In this specific case we can wrap the service instance with an IOC::Proxy object and be able to capture calls to the service instance through our proxy. The simplest use for this is some kind of logging.The IOC::Proxy object does everything within it's power to make sure that the proxy object can be used as a drop in replacement to the service instance. This means we do not impose our OO-style on you class nor do we mess with your class's symbol table, and we are as transparent as possible. Requirements: · Perl


IOC::Proxy Related Software