[Koha-patches] [PATCH] removed needless imports of the YAML module

Galen Charlton gmcharlt at gmail.com
Tue May 25 23:32:19 CEST 2010


Removed instances of 'use YAML' that were either completely
unnecessary or which were used only in debug code.  Also
removed a needless import of Data::Dumper.

Signed-off-by: Galen Charlton <gmcharlt at gmail.com>
---
 C4/SQLHelper.pm          |    1 -
 C4/Search.pm             |    2 --
 admin/aqbudgets.pl       |    2 --
 cataloguing/merge.pl     |    2 --
 members/member.pl        |    1 -
 opac/opac-suggestions.pl |    2 +-
 tools/batchMod.pl        |    1 -
 xt/permissions.t         |    1 -
 8 files changed, 1 insertions(+), 11 deletions(-)

diff --git a/C4/SQLHelper.pm b/C4/SQLHelper.pm
index 4470742..8f994d3 100644
--- a/C4/SQLHelper.pm
+++ b/C4/SQLHelper.pm
@@ -24,7 +24,6 @@ use List::MoreUtils qw(first_value any);
 use C4::Context;
 use C4::Dates qw(format_date_in_iso);
 use C4::Debug;
-use YAML;
 require Exporter;
 use vars qw($VERSION @ISA @EXPORT_OK %EXPORT_TAGS);
 
diff --git a/C4/Search.pm b/C4/Search.pm
index c94006c..cb97a1e 100644
--- a/C4/Search.pm
+++ b/C4/Search.pm
@@ -29,7 +29,6 @@ use C4::XSLT;
 use C4::Branch;
 use C4::Reserves;    # CheckReserves
 use C4::Debug;
-use YAML;
 use URI::Escape;
 
 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $DEBUG);
@@ -651,7 +650,6 @@ sub _remove_stopwords {
 #
 		foreach ( keys %{ C4::Context->stopwords } ) {
 			next if ( $_ =~ /(and|or|not)/ );    # don't remove operators
-			$debug && warn "$_ Dump($operand)";
 			if ( my ($matched) = ($operand =~
 				/([^\X\p{isAlnum}]\Q$_\E[^\X\p{isAlnum}]|[^\X\p{isAlnum}]\Q$_\E$|^\Q$_\E[^\X\p{isAlnum}])/gi))
 			{
diff --git a/admin/aqbudgets.pl b/admin/aqbudgets.pl
index 22c80c8..9da555d 100755
--- a/admin/aqbudgets.pl
+++ b/admin/aqbudgets.pl
@@ -239,8 +239,6 @@ if ($op eq 'add_form') {
     my $period_total = 0;
     my ( $period_alloc_total, $base_spent_total );
 
-	use YAML;
-	$debug && warn Dump(@budgets);
 	#This Looks WEIRD to me : should budgets be filtered in such a way ppl who donot own it would not see the amount spent on the budget by others ?
 
     foreach my $budget (@budgets) {
diff --git a/cataloguing/merge.pl b/cataloguing/merge.pl
index b1cddf2..1b890ba 100755
--- a/cataloguing/merge.pl
+++ b/cataloguing/merge.pl
@@ -26,7 +26,6 @@ use C4::Auth;
 use C4::Items;
 use C4::Biblio;
 use C4::Serials;
-use YAML;
 
 my $input = new CGI;
 my @biblionumber = $input->param('biblionumber');
@@ -69,7 +68,6 @@ if ($merge) {
 
     # Moving items from the other record to the reference record
     my $itemnumbers = get_itemnumbers_of($frombiblio);
-    use Data::Dumper;
     foreach my $itloop ($itemnumbers->{$frombiblio}) {
 	foreach my $itemnumber (@$itloop) {
 	    my $res = MoveItemFromBiblio($itemnumber, $frombiblio, $tobiblio);
diff --git a/members/member.pl b/members/member.pl
index e92ab43..3b1b98e 100755
--- a/members/member.pl
+++ b/members/member.pl
@@ -31,7 +31,6 @@ use C4::Members;
 use C4::Branch;
 use C4::Category;
 use File::Basename;
-use YAML;
 
 my $input = new CGI;
 my $quicksearch = $input->param('quicksearch');
diff --git a/opac/opac-suggestions.pl b/opac/opac-suggestions.pl
index e11cd0b..fc9ce51 100755
--- a/opac/opac-suggestions.pl
+++ b/opac/opac-suggestions.pl
@@ -68,7 +68,7 @@ else {
 	$$suggestion{suggestedby} ||= $borrowernumber unless ($allsuggestions);
 }
 # warn "bornum:",$borrowernumber;
-use YAML;
+
 my $suggestions_loop =
   &SearchSuggestion( $suggestion);
 if ( $op eq "add_confirm" ) {
diff --git a/tools/batchMod.pl b/tools/batchMod.pl
index 67397e1..310624f 100755
--- a/tools/batchMod.pl
+++ b/tools/batchMod.pl
@@ -32,7 +32,6 @@ use C4::BackgroundJob;
 use C4::ClassSource;
 use C4::Dates;
 use C4::Debug;
-use YAML;
 use Switch;
 use MARC::File::XML;
 
diff --git a/xt/permissions.t b/xt/permissions.t
index 6231875..7e61524 100755
--- a/xt/permissions.t
+++ b/xt/permissions.t
@@ -23,7 +23,6 @@ use warnings;
 use Test::More qw(no_plan);
 
 use C4::Context;
-use YAML;
 
 my $root_dir = C4::Context->config( 'intranetdir' ) . '/installer/data/mysql';
 my $base_perms_file = "en/mandatory/userpermissions.sql";
-- 
1.7.0




More information about the Koha-patches mailing list