diff options
Diffstat (limited to 'MDK/Common/Various.pm')
-rw-r--r-- | MDK/Common/Various.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/MDK/Common/Various.pm b/MDK/Common/Various.pm index b012343..93fbb80 100644 --- a/MDK/Common/Various.pm +++ b/MDK/Common/Various.pm @@ -2,7 +2,7 @@ package MDK::Common::Various; use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK); @ISA = qw(Exporter); -@EXPORT_OK = qw(first second top bool to_int to_float bool2text bool2yesno text2bool chomp_ backtrace); +@EXPORT_OK = qw(first second top to_bool to_int to_float bool2text bool2yesno text2bool chomp_ backtrace); %EXPORT_TAGS = (all => [ @EXPORT_OK ]); @@ -10,7 +10,7 @@ sub first { $_[0] } sub second { $_[1] } sub top { $_[-1] } -sub bool { $_[0] ? 1 : 0 } +sub to_bool { $_[0] ? 1 : 0 } sub to_int { $_[0] =~ /(\d*)/; $1 } sub to_float { $_[0] =~ /(\d*(\.\d*)?)/; $1 } sub bool2text { $_[0] ? "true" : "false" } |