From d9cfaa9d6c87d34468a43a1805e49f03bdf07bc4 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 21 May 2013 09:53:03 -0700 Subject: [PATCH] bug 8215: (followup) make sure C4::CourseReserves doesn't export anything New modules should not export any symbols by default without a very good reason. Signed-off-by: Galen Charlton Signed-off-by: Kyle M Hall --- C4/CourseReserves.pm | 8 ++++---- catalogue/detail.pl | 2 +- course_reserves/add_items.pl | 2 +- course_reserves/course-details.pl | 2 +- course_reserves/course-reserves.pl | 2 +- course_reserves/course.pl | 2 +- course_reserves/mod_course.pl | 2 +- opac/opac-course-details.pl | 2 +- opac/opac-course-reserves.pl | 2 +- opac/opac-detail.pl | 2 +- t/db_dependent/CourseReserves.t | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/C4/CourseReserves.pm b/C4/CourseReserves.pm index 35fe269..12b6375 100644 --- a/C4/CourseReserves.pm +++ b/C4/CourseReserves.pm @@ -17,8 +17,6 @@ package C4::CourseReserves; use Modern::Perl; -require Exporter; - use C4::Context; use C4::Items qw(GetItem ModItem); use C4::Biblio qw(GetBiblioFromItemNumber); @@ -27,8 +25,9 @@ use C4::Circulation qw(GetOpenIssue); use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $DEBUG @FIELDS); BEGIN { - @ISA = qw(Exporter); - @EXPORT = qw( + require Exporter; + @ISA = qw(Exporter); + @EXPORT_OK = qw( &GetCourse &ModCourse &GetCourses @@ -49,6 +48,7 @@ BEGIN { &GetItemReservesInfo ); + %EXPORT_TAGS = ( 'all' => \@EXPORT_OK ); $DEBUG = 0; @FIELDS = ( 'itype', 'ccode', 'holdingbranch', 'location' ); diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 6f005d8..e9190d2 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -41,7 +41,7 @@ use C4::XSLT; use C4::Images; use Koha::DateUtils; use C4::HTML5Media; -use C4::CourseReserves; +use C4::CourseReserves qw(GetItemReservesInfo); # use Smart::Comments; diff --git a/course_reserves/add_items.pl b/course_reserves/add_items.pl index c94f373..9429d91 100755 --- a/course_reserves/add_items.pl +++ b/course_reserves/add_items.pl @@ -28,7 +28,7 @@ use C4::Koha; use C4::Biblio; use C4::Branch; -use C4::CourseReserves; +use C4::CourseReserves qw(GetCourse GetCourseItem GetCourseReserve ModCourseItem ModCourseReserve); my $cgi = new CGI; diff --git a/course_reserves/course-details.pl b/course_reserves/course-details.pl index bc224d4..8a578d5 100755 --- a/course_reserves/course-details.pl +++ b/course_reserves/course-details.pl @@ -26,7 +26,7 @@ use C4::Auth; use C4::Output; use C4::Koha; -use C4::CourseReserves; +use C4::CourseReserves qw(DelCourseReserve GetCourse GetCourseReserves); my $cgi = new CGI; diff --git a/course_reserves/course-reserves.pl b/course_reserves/course-reserves.pl index 8b4e50e..b81bc94 100755 --- a/course_reserves/course-reserves.pl +++ b/course_reserves/course-reserves.pl @@ -25,7 +25,7 @@ use CGI; use C4::Auth; use C4::Output; -use C4::CourseReserves; +use C4::CourseReserves qw(GetCourses); my $cgi = new CGI; diff --git a/course_reserves/course.pl b/course_reserves/course.pl index fad7bad..a82c781 100755 --- a/course_reserves/course.pl +++ b/course_reserves/course.pl @@ -26,7 +26,7 @@ use C4::Auth; use C4::Output; use C4::Koha; -use C4::CourseReserves; +use C4::CourseReserves qw(GetCourse); my $cgi = new CGI; diff --git a/course_reserves/mod_course.pl b/course_reserves/mod_course.pl index 0ff6d74..2a2c70f 100755 --- a/course_reserves/mod_course.pl +++ b/course_reserves/mod_course.pl @@ -25,7 +25,7 @@ use C4::Output; use C4::Reserves; use C4::Auth; -use C4::CourseReserves; +use C4::CourseReserves qw(DelCourse ModCourse ModCourseInstructors); my $cgi = new CGI; my ( $template, $loggedinuser, $cookie ) = get_template_and_user( diff --git a/opac/opac-course-details.pl b/opac/opac-course-details.pl index 0787315..df50e47 100755 --- a/opac/opac-course-details.pl +++ b/opac/opac-course-details.pl @@ -26,7 +26,7 @@ use C4::Auth; use C4::Output; use C4::Koha; -use C4::CourseReserves; +use C4::CourseReserves qw(GetCourse GetCourseReserves); my $cgi = new CGI; diff --git a/opac/opac-course-reserves.pl b/opac/opac-course-reserves.pl index cc94c4c..83852c4 100755 --- a/opac/opac-course-reserves.pl +++ b/opac/opac-course-reserves.pl @@ -25,7 +25,7 @@ use CGI; use C4::Auth; use C4::Output; -use C4::CourseReserves; +use C4::CourseReserves qw(SearchCourses); my $cgi = new CGI; diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 05e69f4..56b014f 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -50,7 +50,7 @@ use List::MoreUtils qw/any none/; use C4::Images; use Koha::DateUtils; use C4::HTML5Media; -use C4::CourseReserves; +use C4::CourseReserves qw(GetItemReservesInfo); BEGIN { if (C4::Context->preference('BakerTaylorEnabled')) { diff --git a/t/db_dependent/CourseReserves.t b/t/db_dependent/CourseReserves.t index d052a44..776f224 100755 --- a/t/db_dependent/CourseReserves.t +++ b/t/db_dependent/CourseReserves.t @@ -11,7 +11,7 @@ use Data::Dumper; BEGIN { use_ok('C4::Context'); - use_ok('C4::CourseReserves'); + use_ok('C4::CourseReserves', qw/:all/); } my $dbh = C4::Context->dbh; -- 1.7.2.5