Class-ExtraAttributes

 view release on metacpan or  search on metacpan

lib/Class/ExtraAttributes.pm  view on Meta::CPAN


 package MyObject;
 use base qw( AnyClass );

 use Class::ExtraAttributes qw( foo );

 my $object = MyObject->new;
 $object->foo($value);
 my $value = $object->foo;

 sub update {  # in case you want persistence for extra attributes
     my $object= shift;
     $object->SUPER::update(@_);

     my @extra= Class::ExtraAttributes->attributes;
     # perform update for extra attributes
 }

 sub retrieve {  # in case you have persistence of extra attributes
     my $class= shift;
     $class->SUPER::retrieve(@_);

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.044 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )