Accepting request 535837 from devel:languages:perl:autoupdate

automatic update

OBS-URL: https://build.opensuse.org/request/show/535837
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Class-Accessor?expand=0&rev=25
This commit is contained in:
Pedro Monreal Gonzalez 2017-10-23 10:04:31 +00:00 committed by Git OBS Bridge
parent eb38b54fda
commit 0f95a73318
5 changed files with 101 additions and 29 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cdb1e0cdf8380fb9b63b44c33ce5afc1068736d55ac5904bf0eaa1efc1c3cefc
size 12315

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

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
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

View File

@ -1,7 +1,7 @@
#
# spec file for package perl-Class-Accessor
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# 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
@ -15,44 +15,79 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: perl-Class-Accessor
Version: 0.51
Release: 0
%define cpan_name Class-Accessor
Summary: Automated accessor generation
Version: 0.34
Release: 12
License: Artistic License ..
License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dists/Class-Accessor
Source: %{cpan_name}-%{version}.tar.gz
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
%{perl_requires}
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Sub::Name)
Requires: perl(Carp)
Requires: perl(Sub::Name)
Provides: %{cpan_name}
%{perl_requires}
%description
This module automatically generates accessor/mutators for your class. Most of
the time, writing accessors is an exercise in cutting and pasting.
This module automagically generates accessors/mutators for your class.
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
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!
Authors:
--------
Michael G Schwern <schwern@pobox.com>
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 OPTIMIZE="$RPM_OPT_FLAGS -Wall"
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}
%check
@ -63,11 +98,8 @@ Authors:
%perl_process_packlist
%perl_gen_filelist
%clean
%{__rm} -rf $RPM_BUILD_ROOT
%files -f %{name}.files
%defattr(-,root,root)
%doc Changes README examples
%defattr(-,root,root,755)
%doc Changes examples README
%changelog