diff options
author | Pascal Rigaux <pixel@mandriva.com> | 1999-09-19 15:55:39 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 1999-09-19 15:55:39 +0000 |
commit | d59b47aea0e5e97536e0cc0d8663ba27bbf8f185 (patch) | |
tree | cb487267ac7d89833c777067039f011b7e2e2e86 /perl-install/common.pm | |
parent | f437e5f69a3fc892a6db36e0b9e9d876b1897a45 (diff) | |
download | drakx-backup-do-not-use-d59b47aea0e5e97536e0cc0d8663ba27bbf8f185.tar drakx-backup-do-not-use-d59b47aea0e5e97536e0cc0d8663ba27bbf8f185.tar.gz drakx-backup-do-not-use-d59b47aea0e5e97536e0cc0d8663ba27bbf8f185.tar.bz2 drakx-backup-do-not-use-d59b47aea0e5e97536e0cc0d8663ba27bbf8f185.tar.xz drakx-backup-do-not-use-d59b47aea0e5e97536e0cc0d8663ba27bbf8f185.zip |
no_comment
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r-- | perl-install/common.pm | 3 |
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] } |