pop

 view release on metacpan or  search on metacpan

lib/POP/Lazy_object_hash.pm  view on Meta::CPAN

Name:	POP::Lazy_object_hash::TIEHASH
Desc:	The tied hash constructor; takes the persistent class, the name of
	this collection in our parent, our parent and a hashref of keys to pids.
	Notice that all the pids must be for objects in the same class
=cut
sub TIEHASH {
  my($type, $class, $name, $parent, $pids) = @_;
  my $pm = $class;
  $pm =~ s,::,/,g;
  $pm .= '.pm';
  return bless {'class' => $class,
                'pm' => $pm,
		'name' => $name,
		'parent' => Devel::WeakRef::->new($parent),
                'hash' => $pids}, $type;
}

=head2 METHOD
Name:	POP::Lazy_object_hash::FETCH
Desc:	Called whenever an element of the tied hash is accessed, this
	will restore the object if it hasn't already been, and then

lib/POP/Lazy_object_list.pm  view on Meta::CPAN

Name:	POP::Lazy_object_list::TIEARRAY
Desc:	The tied array constructor; takes the persistent class name and a
	list of pids as arguments.  Notice that all the pids must be for
	objects in the same class
=cut
sub TIEARRAY {
  my($type, $class, $name, $parent, @pids) = @_;
  my $pm = $class;
  $pm =~ s,::,/,g;
  $pm .= '.pm';
  return bless {'class' => $class,
                'pm' => $pm,
		'name' => $name,
		'parent' => Devel::WeakRef::->new($parent),
                'list' => [@pids]}, $type;
}

=head2 METHOD
Name:	POP::Lazy_object_list::FETCH
Desc:	Called whenever an element of the tied array is accessed, this
	will restore the object if it hasn't already been, and then



( run in 0.972 second using v1.01-cache-2.11-cpan-65fba6d93b7 )