From 41201e5c4f4b0d9fa1d0cc18ee39430082668e01 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 20 Aug 2010 12:35:31 -0500 Subject: [PATCH] remove WebGUI::Utility::makeArrayCommaSafe --- lib/WebGUI/Utility.pm | 20 +------------------- t/Utility.t | 9 --------- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/lib/WebGUI/Utility.pm b/lib/WebGUI/Utility.pm index 76a79f94f..e44c426b9 100644 --- a/lib/WebGUI/Utility.pm +++ b/lib/WebGUI/Utility.pm @@ -23,7 +23,7 @@ use Net::CIDR::Lite; our @ISA = qw(Exporter); our @EXPORT = qw(&makeTabSafe &makeArrayTabSafe &randomizeHash &randomizeArray &isInSubnet - &sortHashDescending &sortHash &isIn &makeCommaSafe &makeArrayCommaSafe &randint &round &scalarEquals + &sortHashDescending &sortHash &isIn &makeCommaSafe &randint &round &scalarEquals ); @@ -40,7 +40,6 @@ This package provides miscellaneous but useful utilities to the WebGUI programme use WebGUI::Utility; $boolean = isIn($value, @array); $boolean = isInSubnet($ip, \@subnets); - makeArrayCommaSafe(\@array); makeArrayTabSafe(\@array); $string = makeCommaSafe($string); $string = makeTabSafe($string); @@ -123,23 +122,6 @@ sub isInSubnet { #------------------------------------------------------------------- -=head2 makeArrayCommaSafe ( array ) - -Searches through an array looking for commas and replaces them with semi-colons. Also replaces carriage returns with spaces. This is useful for exporting comma separated data. - -=head3 array - -A reference to the array to look through. - -=cut - -sub makeArrayCommaSafe { - my $array = $_[0]; - $_ = makeCommaSafe($_) for @$array; -} - -#------------------------------------------------------------------- - =head2 makeArrayTabSafe ( array ) Searches through an array looking for tabs and replaces them with four spaces. Also replaces carriage returns with a space. This is useful for exporting tab separated data. diff --git a/t/Utility.t b/t/Utility.t index 3af8b0a76..2c541b0b9 100644 --- a/t/Utility.t +++ b/t/Utility.t @@ -25,15 +25,6 @@ my $session = WebGUI::Test->session; # isIn ok(WebGUI::Utility::isIn("webgui", qw(cars trucks webgui trains)), 'isIn()'); -# makeArrayCommaSafe -my @commaFilledArray = ("this,that", "foo,bar", "x-y"); -WebGUI::Utility::makeArrayCommaSafe(\@commaFilledArray); -my $noCommaFound = 1; -foreach my $row (@commaFilledArray) { - $noCommaFound = 0 if ($row =~ m/,/); -} -ok($noCommaFound, 'makeArrayCommaSafe()'); - # makeCommaSafe unlike(WebGUI::Utility::makeCommaSafe("this,that,foo,,bar"), qr/,/, 'makeCommaSafe()'); is(