perl-Class-Accessor-Lazy - class accessors generation with lazy accessors and fast mode support

Property Value
Distribution ALT Linux Sisyphus
Repository Autoimports noarch
Package name perl-Class-Accessor-Lazy
Package version 1.003
Package release alt2
Package architecture noarch
Package type rpm
Installed size 17.80 KB
Download size 17.80 KB
Official Mirror
This module merges the power of two separate modules: the Class::Accessor manpage and
the Class::Accessor::Fast manpage. Additionaly providing methods to create lazy
It can provide accessors creation methods for your class using two algorithms,
provided by modules above. But now you may change algorithm in
the code:
package Foo;
use base qw(Class::Accessor::Lazy);
Main documentation may be found on the Class::Accessor manpage and
the Class::Accessor::Fast manpage 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
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 property.
IMPORTANT: every lazy property of the class MUST have related init method. The
name of such method is `_lazy_init_{property name}'.


Package Version Architecture Repository
perl-Class-Accessor-Lazy - - -


Name Value
/usr/share/perl5 -
perl(Class/ -
perl(Class/Accessor/ -
perl( -
rpmlib(PayloadIsLzma) -


Name Value
perl(Class/Accessor/ = 1.003
perl(Class/Accessor/Lazy/ = 1.0
perl(Class/Accessor/Lazy/ = 1.0
perl-Class-Accessor-Lazy = 1.003-alt2


Type URL
Binary Package perl-Class-Accessor-Lazy-1.003-alt2.noarch.rpm
Source Package perl-Class-Accessor-Lazy-1.003-alt2.src.rpm

Install Howto

  1. Add the following line to /etc/apt/sources.list:
    rpm [Sisyphus] noarch autoimports
    rpm [Sisyphus] noarch autoimports
  2. Update the package index:
    # sudo apt-get update
  3. Install perl-Class-Accessor-Lazy rpm package:
    # sudo apt-get install perl-Class-Accessor-Lazy



See Also

Package Description
perl-Class-Accessor-Lite-Lazy-0.03-alt1.noarch.rpm Class::Accessor::Lite with lazy accessor feature
perl-Class-Accessor-Lvalue-0.11-alt3_8.noarch.rpm Class-Accessor-Lvalue module for perl
perl-Class-Accessor-Named-0.009-alt1.noarch.rpm Better profiling output for Class::Accessor
perl-Class-Accessor-PackedString-0.001-alt1.noarch.rpm Generate accessors/constructor for object that use pack()-ed string as storage backend
perl-Class-Accessor-PackedString-Set-0.001-alt1.noarch.rpm Like Class::Accessor::PackedString, but store attributes as they are set
perl-Class-Accessor-Ref-0.05-alt1_10.noarch.rpm Class-Accessor-Ref module for perl
perl-Class-Accessor-Tiny-0.10-alt1.noarch.rpm Perl Tiny Accessors for PBP
perl-Class-Accessor-TrackDirty-0.11-alt1.noarch.rpm Define simple entities stored in some places
perl-Class-Accessor-WithDefault-0.23-alt1.noarch.rpm Set Default Value Implement on Class::Accessor
perl-Class-AccessorMaker-1.1-alt1.noarch.rpm perl module Class-AccessorMaker
perl-Class-Action-0.4-alt1.noarch.rpm Basic command pattern obj undo/rollback actions
perl-Class-ActsLike-1.00-alt1.noarch.rpm Perl extension for identifying class behavior similarities
perl-Class-Agreement-0.02-alt1.noarch.rpm add contracts to your Perl classes easily
perl-Class-AlzaboWrapper-0.14-alt1.noarch.rpm Higher level wrapper around Alzabo Row and Table objects
perl-Class-Anonymous-0.03-alt1.noarch.rpm Truly private classes with private data for Perl5