From 5ea2e837006bf5f65d6ea26a9418b72d188a434f Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Thu, 14 Dec 2023 17:24:50 +0000 Subject: [PATCH] Bug 35581: Koha::Illrequest::SupplierUpdate* -> Koha::ILL::Request::SupplierUpdate* Koha/Illrequest/SupplierUpdate.pm -> Koha/ILL/Request/SupplierUpdate.pm Koha/Illrequest/SupplierUpdateProcessor.pm -> Koha/ILL/Request/SupplierUpdateProcessor.pm Signed-off-by: David Nind Signed-off-by: Pedro Amorim Signed-off-by: Katrin Fischer --- Koha/{Illrequest => ILL/Request}/SupplierUpdate.pm | 12 ++++++------ .../Request}/SupplierUpdateProcessor.pm | 8 ++++---- Koha/Illrequest.pm | 2 +- misc/process_ill_updates.pl | 2 +- t/db_dependent/Illrequest/SupplierUpdate.t | 10 +++++----- t/db_dependent/Illrequests.t | 2 +- 6 files changed, 18 insertions(+), 18 deletions(-) rename Koha/{Illrequest => ILL/Request}/SupplierUpdate.pm (85%) rename Koha/{Illrequest => ILL/Request}/SupplierUpdateProcessor.pm (92%) diff --git a/Koha/Illrequest/SupplierUpdate.pm b/Koha/ILL/Request/SupplierUpdate.pm similarity index 85% rename from Koha/Illrequest/SupplierUpdate.pm rename to Koha/ILL/Request/SupplierUpdate.pm index 3cc54298fc..e966b02e01 100644 --- a/Koha/Illrequest/SupplierUpdate.pm +++ b/Koha/ILL/Request/SupplierUpdate.pm @@ -1,4 +1,4 @@ -package Koha::Illrequest::SupplierUpdate; +package Koha::ILL::Request::SupplierUpdate; # Copyright 2022 PTFS Europe Ltd # @@ -21,7 +21,7 @@ use Modern::Perl; =head1 NAME -Koha::Illrequest::SupplierUpdate - Represents a single request update from a supplier +Koha::ILL::Request::SupplierUpdate - Represents a single request update from a supplier =head1 SYNOPSIS @@ -39,13 +39,13 @@ an update from a supplier =head3 new - my $update = Koha::Illrequest::SupplierUpdate->new( + my $update = Koha::ILL::Request::SupplierUpdate->new( $source_type, $source_name, $update ); -Create a new Koha::Illrequest::SupplierUpdate object. +Create a new Koha::ILL::Request::SupplierUpdate object . =cut @@ -66,7 +66,7 @@ sub new { =head3 attach_processor - Koha::Illrequest::SupplierUpdate->attach_processor($processor); + Koha::ILL::Request::SupplierUpdate->attach_processor($processor); Pushes a processor function onto the 'processors' arrayref @@ -79,7 +79,7 @@ sub attach_processor { =head3 run_processors - Koha::Illrequest::SupplierUpdate->run_processors(); + Koha::ILL::Request::SupplierUpdate->run_processors(); Iterates all processors on this object and runs each diff --git a/Koha/Illrequest/SupplierUpdateProcessor.pm b/Koha/ILL/Request/SupplierUpdateProcessor.pm similarity index 92% rename from Koha/Illrequest/SupplierUpdateProcessor.pm rename to Koha/ILL/Request/SupplierUpdateProcessor.pm index 3136127c83..69d3233fb3 100644 --- a/Koha/Illrequest/SupplierUpdateProcessor.pm +++ b/Koha/ILL/Request/SupplierUpdateProcessor.pm @@ -1,4 +1,4 @@ -package Koha::Illrequest::SupplierUpdateProcessor; +package Koha::ILL::Request::SupplierUpdateProcessor; # Copyright 2022 PTFS Europe Ltd # @@ -51,11 +51,11 @@ Create a new Koha::Illrequest::SupplierUpdateProcessor object. sub new { my ( $class, $target_source_type, $target_source_name, $processor_name ) = @_; - my $self = {}; + my $self = {}; $self->{target_source_type} = $target_source_type; $self->{target_source_name} = $target_source_name; - $self->{name} = $processor_name; + $self->{name} = $processor_name; bless $self, $class; @@ -71,7 +71,7 @@ Runs the processor =cut sub run { - my ( $self ) = @_; + my ($self) = @_; my ( $package, $filename ) = caller; warn __PACKAGE__ . " run should only be invoked by a subclass\n"; } diff --git a/Koha/Illrequest.pm b/Koha/Illrequest.pm index 9c2a70a642..ed437e473f 100644 --- a/Koha/Illrequest.pm +++ b/Koha/Illrequest.pm @@ -1852,7 +1852,7 @@ sub get_notice { =head3 attach_processors -Receive a Koha::Illrequest::SupplierUpdate and attach +Receive a Koha::ILL::Request::SupplierUpdate and attach any processors we have for it =cut diff --git a/misc/process_ill_updates.pl b/misc/process_ill_updates.pl index fb2e22544c..3acba3d47f 100755 --- a/misc/process_ill_updates.pl +++ b/misc/process_ill_updates.pl @@ -129,7 +129,7 @@ while (my $request = $requests->next) { # process it # # Since each backend's update format is different, it may - # be necessary for a backend to subclass Koha::Illrequest::SupplierUpdate + # be necessary for a backend to subclass Koha::ILL::Request::SupplierUpdate # so it can provide methods (corresponding to a generic interface) that # return pertinent info to core ILL when it is processing updates # diff --git a/t/db_dependent/Illrequest/SupplierUpdate.t b/t/db_dependent/Illrequest/SupplierUpdate.t index 72d2fc280e..281c1df5f4 100755 --- a/t/db_dependent/Illrequest/SupplierUpdate.t +++ b/t/db_dependent/Illrequest/SupplierUpdate.t @@ -20,22 +20,22 @@ use Modern::Perl; use Test::MockObject; use Koha::Illrequest; -use Koha::Illrequest::SupplierUpdate; +use Koha::ILL::Request::SupplierUpdate; use Test::More tests => 4; -use_ok('Koha::Illrequest::SupplierUpdate'); +use_ok('Koha::ILL::Request::SupplierUpdate'); -my $update = Koha::Illrequest::SupplierUpdate->new( +my $update = Koha::ILL::Request::SupplierUpdate->new( 'test_type', 'test_name', 'Arbitrary update text' ); -isa_ok( $update, 'Koha::Illrequest::SupplierUpdate' ); +isa_ok( $update, 'Koha::ILL::Request::SupplierUpdate' ); my $processor = Test::MockObject->new; -$processor->set_isa('Koha::Illrequest::Processor'); +$processor->set_isa('Koha::ILL::Request::Processor'); $processor->{name} = 'Test processor'; $processor->mock('run', sub { my ( $self, $update, $options, $result ) = @_; diff --git a/t/db_dependent/Illrequests.t b/t/db_dependent/Illrequests.t index 538a24c11b..48128f9960 100755 --- a/t/db_dependent/Illrequests.t +++ b/t/db_dependent/Illrequests.t @@ -952,7 +952,7 @@ subtest 'Helpers' => sub { my $type = 'test_type_1'; my $name = 'test_name_1'; my $update = Test::MockObject->new; - $update->set_isa('Koha::Illrequest::SupplierUpdate'); + $update->set_isa('Koha::ILL::Request::SupplierUpdate'); $update->{source_type} = $type; $update->{source_name} = $name; $update->{processors} = []; -- 2.39.5