summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-04-29 17:14:38 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-04-29 17:14:38 +0000
commit65647f84ab945df2c9668cf172ab5735fced370b (patch)
treeaf7e12258c49921467312be94d45486daeab4783
parentf198b79e0ade17a067eb4b062abfd0e498fc817f (diff)
downloadperl-MDK-Common-65647f84ab945df2c9668cf172ab5735fced370b.tar
perl-MDK-Common-65647f84ab945df2c9668cf172ab5735fced370b.tar.gz
perl-MDK-Common-65647f84ab945df2c9668cf172ab5735fced370b.tar.bz2
perl-MDK-Common-65647f84ab945df2c9668cf172ab5735fced370b.tar.xz
perl-MDK-Common-65647f84ab945df2c9668cf172ab5735fced370b.zip
perl_checker compliance
-rw-r--r--MDK/Common/Various.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/MDK/Common/Various.pm b/MDK/Common/Various.pm
index 2abbb14..548aed3 100644
--- a/MDK/Common/Various.pm
+++ b/MDK/Common/Various.pm
@@ -107,8 +107,8 @@ sub second { $_[1] }
sub top { $_[-1] }
sub to_bool { $_[0] ? 1 : 0 }
-sub to_int { $_[0] =~ /(\d*)/; $1 }
-sub to_float { $_[0] =~ /(\d*(\.\d*)?)/; $1 }
+sub to_int { $_[0] =~ /(\d*)/ && $1 }
+sub to_float { $_[0] =~ /(\d*(\.\d*)?)/ && $1 }
sub bool2text { $_[0] ? "true" : "false" }
sub bool2yesno { $_[0] ? "yes" : "no" }
sub text2bool { my $t = lc($_[0]); $t eq "true" || $t eq "yes" ? 1 : 0 }