remove WebGUI::Utility::makeCommaSafe

This commit is contained in:
Graham Knop 2010-08-20 12:40:40 -05:00
parent 55bd411e2c
commit 4f989781df
2 changed files with 1 additions and 32 deletions

View file

@ -23,7 +23,7 @@ use Net::CIDR::Lite;
our @ISA = qw(Exporter);
our @EXPORT = qw(&makeTabSafe &randomizeHash &randomizeArray &isInSubnet
&sortHashDescending &sortHash &isIn &makeCommaSafe &randint &round &scalarEquals
&sortHashDescending &sortHash &isIn &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);
$string = makeCommaSafe($string);
$string = makeTabSafe($string);
$integer = randint($low,$high);
$hashRef = randomizeHash(\%hash);
@ -121,24 +120,6 @@ sub isInSubnet {
#-------------------------------------------------------------------
=head2 makeCommaSafe ( text )
Replaces commas with semi-colons and carriage returns with spaces.
=head3 text
The text to search through.
=cut
sub makeCommaSafe {
my $text = $_[0];
$text =~ tr/,\r\n/; /;
return $text;
}
#-------------------------------------------------------------------
=head2 makeTabSafe ( text )
Replaces tabs with four spaces and carriage returns with a space each.

View file

@ -25,18 +25,6 @@ my $session = WebGUI::Test->session;
# isIn
ok(WebGUI::Utility::isIn("webgui", qw(cars trucks webgui trains)), 'isIn()');
# makeCommaSafe
unlike(WebGUI::Utility::makeCommaSafe("this,that,foo,,bar"), qr/,/, 'makeCommaSafe()');
is(
WebGUI::Utility::makeCommaSafe("this,that,foo,,bar"),
'this;that;foo;;bar',
'makeCommaSafe()'
);
is(
WebGUI::Utility::makeCommaSafe("this,that\nfoo\rbar\r\n"),
'this;that foo bar ',
'makeCommaSafe()'
);
# makeTabSafe
unlike(WebGUI::Utility::makeTabSafe("this\tthat\tfoo\tbar\t"), qr/\t/, 'makeTabSafe()');