Sync from SUSE:SLFO:Main perl-Class-Accessor revision 8a74a9a1bdd1e8318a8b5e56980c298a

This commit is contained in:
Adrian Schröter 2024-05-03 17:56:09 +02:00
commit 10b1903025
5 changed files with 308 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

BIN
Class-Accessor-0.51.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

28
cpanspec.yml Normal file
View File

@ -0,0 +1,28 @@
---
#description_paragraphs: 3
#description: |-
# override description from CPAN
#summary: override summary from CPAN
#no_testing: broken upstream
#sources:
# - source1
# - source2
#patches:
# foo.patch: -p1
# bar.patch:
#preamble: |-
# BuildRequires: gcc-c++
#post_prep: |-
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'`
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL
#post_build: |-
# rm unused.files
#post_install: |-
# sed on %{name}.files
#license: SUSE-NonFree
#skip_noarch: 1
#custom_build: |-
#./Build build flags=%{?_smp_mflags} --myflag
#custom_test: |-
#startserver && make test
#ignore_requires: Bizarre::Module

149
perl-Class-Accessor.changes Normal file
View File

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

105
perl-Class-Accessor.spec Normal file
View File

@ -0,0 +1,105 @@
#
# spec file for package perl-Class-Accessor
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: perl-Class-Accessor
Version: 0.51
Release: 0
%define cpan_name Class-Accessor
Summary: Automated accessor generation
License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/Class-Accessor/
Source0: https://cpan.metacpan.org/authors/id/K/KA/KASEI/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
%{perl_requires}
%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(@_) {
$self->{name} = $_[0];
}
return $self->{name};
}
sub salary {
my $self = shift;
if(@_) {
$self->{salary} = $_[0];
}
return $self->{salary};
}
# etc...
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'.
%prep
%setup -q -n %{cpan_name}-%{version}
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}
%check
%{__make} test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes examples README
%changelog