From 37873483a64296e1983a3b63f2228375700d713f Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 27 Apr 2015 13:42:20 +0200 Subject: [PATCH] Bug 14066: Remove the Readonly[::XS] dependency MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Mark Tompsett Signed-off-by: Marc Véron Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- 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 79cbc14a2d..4b2067eeab 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 6013a2535f..451c6a3375 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.39.5