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-slfo.1.1.3 RPM for noarch

From OpenSuSE Leap 16.0 for noarch

Name: perl-Class-Accessor Distribution: SUSE Linux Framework One
Version: 0.51 Vendor: SUSE LLC <https://www.suse.com/>
Release: slfo.1.1.3 Build date: Mon Aug 26 10:52:24 2024
Group: Development/Libraries/Perl Build host: h04-ch1d
Size: 41641 Source RPM: perl-Class-Accessor-0.51-slfo.1.1.3.src.rpm
Packager: https://www.suse.com/
Url: http://search.cpan.org/dist/Class-Accessor/
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->follow_best_practice;
    Foo->mk_accessors( qw(far bar car) );

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

Provides

Requires

License

Artistic-1.0 or GPL-1.0+

Changelog

* Mon Oct 23 2017 coolo@suse.com
  - 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 coolo@suse.com
  - use original .tar.gz
* Mon Aug 22 2011 lars@linux-schulserver.de
  - enhance the description
  - also package examples directory
* Tue Nov 30 2010 coolo@novell.com
  - switch to perl_requires macro
* Mon Mar 08 2010 chris@computersalat.de
  - cleanup spec
    o dep for perl-macros
    o Provides
    o Makefile.PL
* Wed Jan 13 2010 anicka@suse.cz
  - update to 0.34
    * add a Moose-like interface: I can haz "has"
* Sun Jan 10 2010 jengelh@medozas.de
  - enable parallel build
* Sat Jul 25 2009 chris@computersalat.de
  - spec mods
    * removed ^----------
    * removed ^#---------
* Sun Jun 28 2009 chris@computersalat.de
  - 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 anicka@suse.cz
  - update to 0.33
    * small cleanups to fix RT#45592 and RT#43493
* Wed Jul 25 2007 anicka@suse.cz
  - update to 0.31
    * applied performance patch from RUZ
* Wed Dec 13 2006 anicka@suse.cz
  - update to 0.30
    * added version numbers back into each class
* Mon Jul 24 2006 anicka@suse.cz
  - update to 0.27
    * added Class::Accessor::Faster that uses an array internally
* Tue Jul 11 2006 anicka@suse.cz
  - update to 0.25
  - minor release
* Wed Jan 25 2006 mls@suse.de
  - converted neededforbuild to BuildRequires
* Tue Jan 03 2006 anicka@suse.cz
  - update to 0.22
* Wed Sep 28 2005 dmueller@suse.de
  - add norootforbuild
* Fri Aug 13 2004 mjancar@suse.cz
  - update to 0.19
* Fri Aug 22 2003 mjancar@suse.cz
  - require the perl version we build with
* Tue Jul 15 2003 mjancar@suse.cz
  - adapt to perl-5.8.1
  - use %perl_process_packlist
* Wed Jun 18 2003 mjancar@suse.cz
  - fix filelist
* Tue May 20 2003 mjancar@suse.cz
  - remove unpackaged files
* Tue Jul 02 2002 mls@suse.de
  - remove race in .packlist generation
* Wed Jun 26 2002 prehak@suse.cz
  - correct permissions of examples directories
* Wed Jan 23 2002 rvasice@suse.cz
  - initial package release (version 0.17)

Files

/usr/lib/perl5/vendor_perl/5.38.2/Class
/usr/lib/perl5/vendor_perl/5.38.2/Class/Accessor
/usr/lib/perl5/vendor_perl/5.38.2/Class/Accessor.pm
/usr/lib/perl5/vendor_perl/5.38.2/Class/Accessor/Fast.pm
/usr/lib/perl5/vendor_perl/5.38.2/Class/Accessor/Faster.pm
/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


Generated by rpm2html 1.8.1

Fabrice Bellet, Sat Nov 9 00:03:33 2024