Class::Persist::Proxy::Collection - Proxy for objects not loaded yet
use qw( Class::Persist::Proxy::Collection ); my $proxy = Class::Persist::Proxy::Collection->new(); $proxy->class('Class::Persist::Address'); $proxy->owner( $contact ); $proxy->push($object1, $object2); $proxy->store(); $obj1 = $proxy->object_at_index(0);
Replace several objects in the DB by a Proxy object. This allows delayed loading of objects.
Class::Persist::Proxy EO::Array
When called for the first time, create an array of proxies representing the real objects.
Replace all the element by proxies
Store any non proxy element in the collection and proxy it
Without parameter, delete all the elements of the collection. If an index is given, deletes the related element.
Class::Persist
Fotango
To install Class::Persist, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Class::Persist
CPAN shell
perl -MCPAN -e shell install Class::Persist
For more information on module installation, please visit the detailed CPAN module installation guide.