Bugzilla – Attachment 38546 Details for
Bug 14066
Koha code does not really use Readonly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14066: Remove the Readonly[::XS] dependency
Bug-14066-Remove-the-ReadonlyXS-dependency.patch (text/plain), 2.21 KB, created by
Jonathan Druart
on 2015-04-27 11:44:15 UTC
(
hide
)
Description:
Bug 14066: Remove the Readonly[::XS] dependency
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-04-27 11:44:15 UTC
Size:
2.21 KB
patch
obsolete
>From b096a49298bc26765dadce489639338db46f3d35 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Mon, 27 Apr 2015 13:42:20 +0200 >Subject: [PATCH] Bug 14066: Remove the Readonly[::XS] dependency > >The Readonly and Readonly::XS package are only used in Koha::Calendar. >IMO the added value of there packages does not justify their purpose. > >Test plan: >1/ Remove Readonly and Readonly::XS >2/ Open the calendar and confirm you don't get any error concerning missing >dependency >--- > C4/Installer/PerlDependencies.pm | 10 ---------- > Koha/Calendar.pm | 5 ++--- > 2 files changed, 2 insertions(+), 13 deletions(-) > >diff --git a/C4/Installer/PerlDependencies.pm b/C4/Installer/PerlDependencies.pm >index 67ec808..ac59c30 100644 >--- a/C4/Installer/PerlDependencies.pm >+++ b/C4/Installer/PerlDependencies.pm >@@ -237,16 +237,6 @@ our $PERL_DEPS = { > 'required' => '1', > 'min_ver' => '0.08' > }, >- 'Readonly' => { >- 'usage' => 'Core', >- 'required' => '1', >- 'min_ver' => '1.03' >- }, >- 'Readonly::XS' => { >- 'usage' => 'Core', >- 'required' => '0', >- 'min_ver' => '1.02' >- }, > 'Graphics::Magick' => { > 'usage' => 'Patron Card Creator Feature', > 'required' => '0', >diff --git a/Koha/Calendar.pm b/Koha/Calendar.pm >index 6013a25..451c6a3 100644 >--- a/Koha/Calendar.pm >+++ b/Koha/Calendar.pm >@@ -8,7 +8,6 @@ use DateTime::Set; > use DateTime::Duration; > use C4::Context; > use Carp; >-use Readonly; > > sub new { > my ( $classname, %options ) = @_; >@@ -34,7 +33,7 @@ sub _init { > ); > $weekly_closed_days_sth->execute( $branch ); > $self->{weekly_closed_days} = [ 0, 0, 0, 0, 0, 0, 0 ]; >- Readonly::Scalar my $sunday => 7; >+ my $sunday => 7; > while ( my $tuple = $weekly_closed_days_sth->fetchrow_hashref ) { > $self->{weekly_closed_days}->[ $tuple->{weekday} ] = 1; > } >@@ -127,7 +126,7 @@ sub addDate { > > if ( $unit eq 'hours' ) { > # Fixed for legacy support. Should be set as a branch parameter >- Readonly::Scalar my $return_by_hour => 10; >+ my $return_by_hour => 10; > > $dt = $self->addHours($startdate, $add_duration, $return_by_hour); > } else { >-- >2.1.0
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 14066
:
38546
|
38577
|
38578
|
38579
|
38580
|
38591
|
38592
|
38593
|
38787
|
38788
|
38789