summaryrefslogtreecommitdiffstats
path: root/perl-install/common.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-09-19 15:55:39 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-09-19 15:55:39 +0000
commitd59b47aea0e5e97536e0cc0d8663ba27bbf8f185 (patch)
treecb487267ac7d89833c777067039f011b7e2e2e86 /perl-install/common.pm
parentf437e5f69a3fc892a6db36e0b9e9d876b1897a45 (diff)
downloaddrakx-d59b47aea0e5e97536e0cc0d8663ba27bbf8f185.tar
drakx-d59b47aea0e5e97536e0cc0d8663ba27bbf8f185.tar.gz
drakx-d59b47aea0e5e97536e0cc0d8663ba27bbf8f185.tar.bz2
drakx-d59b47aea0e5e97536e0cc0d8663ba27bbf8f185.tar.xz
drakx-d59b47aea0e5e97536e0cc0d8663ba27bbf8f185.zip
no_comment
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r--perl-install/common.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm
index 8b158f010..199f2320a 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -6,7 +6,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK $printable_chars $sizeof_int $bitof_int
@ISA = qw(Exporter);
%EXPORT_TAGS = (
- common => [ qw(__ min max sum sign product bool listlength bool2text to_int to_float ikeys member divide is_empty_array_ref is_empty_hash_ref add2hash set_new set_add round round_up round_down first second top uniq translate untranslate warp_text) ],
+ common => [ qw(__ min max sqr sum sign product bool listlength bool2text to_int to_float ikeys member divide is_empty_array_ref is_empty_hash_ref add2hash set_new set_add round round_up round_down first second top uniq translate untranslate warp_text) ],
functional => [ qw(fold_left map_index map_tab_hash mapn mapn_ difference2 before_leaving catch_cdie cdie) ],
file => [ qw(dirname basename touch all glob_ cat_ chop_ mode) ],
system => [ qw(sync makedev unmakedev psizeof strcpy gettimeofday syscall_ crypt_ getVarsFromSh setVarsInSh) ],
@@ -40,6 +40,7 @@ sub __ { $_[0] }
sub min { fold_left { $a < $b ? $a : $b } @_ }
sub max { fold_left { $a > $b ? $a : $b } @_ }
sub sum { fold_left { $a + $b } @_ }
+sub sqr { $_[0] * $_[0] }
sub sign { $_[0] <=> 0 }
sub product { fold_left { $a * $b } @_ }
sub first { $_[0] }