Index index by Group index by Distribution index by Vendor index by creation date index by Name Mirrors Help Search

perl-Class-Accessor-0.51-1.14 RPM for noarch

From OpenSuSE Tumbleweed for noarch

Name: perl-Class-Accessor Distribution: openSUSE Tumbleweed
Version: 0.51 Vendor: openSUSE
Release: 1.14 Build date: Sun Sep 26 00:38:36 2021
Group: Development/Libraries/Perl Build host: lamb06
Size: 42491 Source RPM: perl-Class-Accessor-0.51-1.14.src.rpm
Summary: Automated accessor generation
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(@_) {
            $self->{name} = $_[0];
        return $self->{name};

    sub salary {
        my $self = shift;
        if(@_) {
            $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->mk_accessors( qw(far bar car) );

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




Artistic-1.0 or GPL-1.0+


* Mon Oct 23 2017
  - updated to 0.51
    see /usr/share/doc/packages/perl-Class-Accessor/Changes
    0.50 2017-10-20
      Thanks to Jonas B. Nielsen for working through the RT queue.
    - patch for speed increase RT#84838
    - patch for faster constructor RT#57353
    - fixed typos for RT#61304 and RT#86422
* Fri Nov 18 2011
  - use original .tar.gz
* Mon Aug 22 2011
  - enhance the description
  - also package examples directory
* Tue Nov 30 2010
  - switch to perl_requires macro
* Mon Mar 08 2010
  - cleanup spec
    o dep for perl-macros
    o Provides
    o Makefile.PL
* Wed Jan 13 2010
  - update to 0.34
    * add a Moose-like interface: I can haz "has"
* Sun Jan 10 2010
  - enable parallel build
* Sat Jul 25 2009
  - spec mods
    * removed ^----------
    * removed ^#---------
* Sun Jun 28 2009
  - added perl-macros
    o autogen filelist with perl_gen_filelist
  - spec mods
    o fixed deps
      no usage of Carp::Assert since 0.15
* Mon May 18 2009
  - update to 0.33
    * small cleanups to fix RT#45592 and RT#43493



Generated by rpm2html 1.8.1

Fabrice Bellet, Mon Oct 18 23:27:06 2021