Class::Persist::Proxy - Proxy for an object not loaded yet
use Class::Persist::Proxy; $proxy = Class::Persist::Proxy->new(); $proxy->class( "AClass" ); $proxy->owner( $owner ); $real = $proxy->load();
Framework to replace objects in the DB by Proxy objects. This allows delayed loading of objects. A proxy acts as the real object itself, it should be transparent. When a method is called on the proxy, the real object is loaded in place of the proxy. If owner() is defined, it will autoload the object based on owner id, otherwise it will load the object based on real_id.
Tries hard to return the oid of the object proxied, if it fails, returns the proxy oid.
Get / set class. If no class is given, tries to guess using Class::Persist::Tracker
Get / set owner. The owner is automatically proxied.
Replace the proxy by its target object
Replace object by proxy