Bugzilla – Attachment 11419 Details for
Bug 7417
Include alternate forms from authorities in bibliographic searches
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7417 follow-up: use Moose-like syntax for accessors
Bug-7417-follow-up-use-Moose-like-syntax-for-acces.patch (text/plain), 2.04 KB, created by
Jared Camins-Esakov
on 2012-08-07 14:25:45 UTC
(
hide
)
Description:
Bug 7417 follow-up: use Moose-like syntax for accessors
Filename:
MIME Type:
Creator:
Jared Camins-Esakov
Created:
2012-08-07 14:25:45 UTC
Size:
2.04 KB
patch
obsolete
>From 934a22a1616d5c2ec44dc7944892dba9ce7944a1 Mon Sep 17 00:00:00 2001 >From: Jared Camins-Esakov <jcamins@cpbibliography.com> >Date: Tue, 7 Aug 2012 10:25:38 -0400 >Subject: [PATCH] Bug 7417 follow-up: use Moose-like syntax for accessors >Content-Type: text/plain; charset="UTF-8" > >In order to make the Koha codebase more consistent, this patch switches >the RecordProcessor code to use the Moose-like syntax supported by >Class::Accessor. >--- > Koha/RecordProcessor.pm | 8 +++++--- > Koha/RecordProcessor/Base.pm | 10 +++++----- > 2 files changed, 10 insertions(+), 8 deletions(-) > >diff --git a/Koha/RecordProcessor.pm b/Koha/RecordProcessor.pm >index 96ade9a..dcee39c 100644 >--- a/Koha/RecordProcessor.pm >+++ b/Koha/RecordProcessor.pm >@@ -58,12 +58,14 @@ clone it I<prior> to passing it off to the RecordProcessor. > =cut > > use Modern::Perl; >+use Class::Accessor "antlers"; > use Module::Load::Conditional qw(can_load); > use Module::Pluggable::Object; > >-use base qw(Class::Accessor); >- >-__PACKAGE__->mk_accessors(qw( schema filters options record )); >+has schema => ( is => "rw" ); >+has filters => ( is => "rw" ); >+has options => ( is => "rw" ); >+has record => ( is => "rw" ); > > =head2 new > >diff --git a/Koha/RecordProcessor/Base.pm b/Koha/RecordProcessor/Base.pm >index e051b74..52a541b 100644 >--- a/Koha/RecordProcessor/Base.pm >+++ b/Koha/RecordProcessor/Base.pm >@@ -59,11 +59,12 @@ clone it I<prior> to passing it off to the RecordProcessor. > =cut > > use Modern::Perl; >+use Class::Accessor "antlers"; > >-use base qw(Class::Accessor); >+has name => ( is => "ro" ); >+has version => ( is => "ro" ); >+has params => ( is => "rw" ); > >-__PACKAGE__->mk_ro_accessors(qw( name version )); >-__PACKAGE__->mk_accessors(qw( params )); > our $NAME = 'Base'; > our $VERSION = '1.0'; > >@@ -78,8 +79,7 @@ Create a new filter; > sub new { > my $class = shift; > >- my $self = $class->SUPER::new( { });#name => $class->NAME, >- #version => $class->VERSION }); >+ my $self = $class->SUPER::new( { }); > > bless $self, $class; > return $self; >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7417
:
11028
|
11253
|
11319
|
11362
|
11363
|
11364
|
11365
|
11366
|
11393
|
11419
|
11427
|
11441
|
11460
|
11465
|
12147
|
12148
|
12199
|
12200
|
12204