From 65b874bb47013e34901e7f79d5f952e07083f657 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 35fe269d01..12b6375c81 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 6f005d8d8e..e9190d24d4 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 c94f373169..9429d9182f 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 bc224d455c..8a578d5386 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 8b4e50e0f3..b81bc94d5f 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 fad7bad7d0..a82c7811c4 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 0ff6d74596..2a2c70f62d 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 0787315625..df50e4754e 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 cc94c4c1d1..83852c4460 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 05e69f4593..56b014f1d1 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 d052a44460..776f224c9f 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; -- 2.39.5