SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

 
 

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

Name : perl-Class-Accessor
Version : 0.51 Vendor : obs://build_opensuse_org/devel:languages:perl
Release : lp155.41.3 Date : 2023-05-17 15:12:52
Group : Development/Libraries/Perl Source RPM : perl-Class-Accessor-0.51-lp155.41.3.src.rpm
Size : 0.04 MB
Packager : https://www_suse_com/
Summary : Automated accessor generation
Description :
This module automagically generates accessors/mutators for your class.

Most of the time, writing accessors is an exercise in cutting and pasting.
You usually wind up with a series of methods like this:

sub name {
my $self = shift;
if(AATT_) {
$self->{name} = $_[0];
}
return $self->{name};
}

sub salary {
my $self = shift;
if(AATT_) {
$self->{salary} = $_[0];
}
return $self->{salary};
}



One for each piece of data in your object. While some will be unique, doing
value checks and special storage tricks, most will simply be exercises in
repetition. Not only is it Bad Style to have a bunch of repetitious code,
but it\'s also simply not lazy, which is the real tragedy.

If you make your module a subclass of Class::Accessor and declare your
accessor fields with mk_accessors() then you\'ll find yourself with a set of
automatically generated accessors which can even be customized!

The basic set up is very simple:

package Foo;
use base qw(Class::Accessor);
Foo->mk_accessors( qw(far bar car) );

Done. Foo now has simple far(), bar() and car() accessors defined.

Alternatively, if you want to follow Damian\'s _best practice_ guidelines
you can use:

package Foo;
use base qw(Class::Accessor);
Foo->follow_best_practice;
Foo->mk_accessors( qw(far bar car) );

*Note:* you must call \'follow_best_practice\' before calling \'mk_accessors\'.

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

Content of RPM  Changelog  Provides Requires

Download
ftp.icm.edu.pl  perl-Class-Accessor-0.51-lp155.41.3.noarch.rpm
     

Provides :
perl(Class::Accessor)
perl(Class::Accessor::Fast)
perl(Class::Accessor::Faster)
perl-Class-Accessor

Requires :
perl(:MODULE_COMPAT_5.26.1)
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.pm
/usr/lib/perl5/vendor_perl/5.26.1/Class/Accessor/Fast.pm
/usr/lib/perl5/vendor_perl/5.26.1/Class/Accessor/Faster.pm
/usr/lib/perl5/vendor_perl/5.26.1/x86_64-linux-thread-multi
/usr/share/doc/packages/perl-Class-Accessor
/usr/share/doc/packages/perl-Class-Accessor/Changes
/usr/share/doc/packages/perl-Class-Accessor/README
/usr/share/doc/packages/perl-Class-Accessor/examples
/usr/share/doc/packages/perl-Class-Accessor/examples/benchmark
/usr/share/man/man3/Class::Accessor.3pm.gz
/usr/share/man/man3/Class::Accessor::Fast.3pm.gz
/usr/share/man/man3/Class::Accessor::Faster.3pm.gz

 
ICM