SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

 
 

perl-Class-Accessor-Lazy rpm build for : OpenSuSE. For other distributions click perl-Class-Accessor-Lazy.

Name : perl-Class-Accessor-Lazy
Version : 1.003 Vendor : obs://build_opensuse_org/devel:languages:perl
Release : lp156.4.1 Date : 2024-07-03 17:50:09
Group : Development/Libraries/Perl Source RPM : perl-Class-Accessor-Lazy-1.003-lp156.4.1.src.rpm
Size : 0.02 MB
Packager : https://www_suse_com/
Summary : Class Accessors Generation with Lazy Accessors and Fast Mode Support
Description :
This module allowes you to create accessors and mutators for your class,
using one of the modules: Class::Accessor or Class::Accessor::Fast, but, in
addition, it allowes you to create lazy accessors.

You may create mix accessors in your module, use Fast and regular ones like
this:

package Foo;
use base qw(Class::Accessor::Lazy);

Foo->follow_best_practice;

Foo->mk_accessors(slow_accessor);

Foo->fast_accessors;

Foo->mk_accessors(fast_accessor);



Foo->follow_best_practice
->mk_accessors(slow_accessor)
->fast_accessors
->mk_accessors(fast_accessor);

Main documentation may be found on Class::Accessor and
Class::Accessor::Fast pages.

The main extension of this module is possibility to make lazy properties,
which will be inited on first get operation (if there was no write before).

Such methods are useful for database representation classes, where related
data may not be read at all and there is no need to fetch it from database.

For example, there are \'Shop\' class and \'Employee\' class. Each \'Shop\' has
property \'employees\', which contains a reference to \'Employee\' objects
list. But, you could fetch Shop object from database just to check \'income\'
property and no don\'t need information about employees at all. In this
case, reading employees list and creating list of \'Employee\' objects makes
absolutely no sense.

But, if you want to get access to them, they should be read from database.
And here are lazy properties comes:

package Shop;
use base \'Class::Accessor::Lazy\';

Shop->follow_best_practice # use set/get for accessors/mutators
->fast_accessors # use Class::Acessor::Fast algorithm
->mk_accessors(\'income\') # regular property
->mk_lazy_accessors(\'employees\'); # lazy property

...

sub _lazy_init_employees
{


}

On first \'get_employees\' invocation, method \'Shop::_lazy_init_employees\'
will be invoked automatically, to allow your class to read related data
from database, for example, and store it in object.

IMPORTANT: every lazy property of the class MUST have related init method.
The name of such method is \'_lazy_init_{property name}\'.

RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-C/15.6/noarch

Content of RPM  Provides Requires

Download
ftp.icm.edu.pl  perl-Class-Accessor-Lazy-1.003-lp156.4.1.noarch.rpm
     

Provides :
perl(Class::Accessor::Lazy)
perl(Class::Accessor::Lazy::Fast)
perl(Class::Accessor::Lazy::Original)
perl-Class-Accessor-Lazy

Requires :
perl(:MODULE_COMPAT_5.26.1)
perl(Class::Accessor)
perl(Class::Accessor::Fast)
perl(parent)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1


Content of RPM :
/usr/lib/perl5/vendor_perl/5.26.1/Class
/usr/lib/perl5/vendor_perl/5.26.1/Class/Accessor
/usr/lib/perl5/vendor_perl/5.26.1/Class/Accessor/Lazy
/usr/lib/perl5/vendor_perl/5.26.1/Class/Accessor/Lazy.pm
/usr/lib/perl5/vendor_perl/5.26.1/Class/Accessor/Lazy/Fast.pm
/usr/lib/perl5/vendor_perl/5.26.1/Class/Accessor/Lazy/Original.pm
/usr/lib/perl5/vendor_perl/5.26.1/x86_64-linux-thread-multi
/usr/share/doc/packages/perl-Class-Accessor-Lazy
/usr/share/doc/packages/perl-Class-Accessor-Lazy/Changes
/usr/share/doc/packages/perl-Class-Accessor-Lazy/README
/usr/share/man/man3/Class::Accessor::Lazy.3pm.gz

 
ICM