diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-05-27 05:24:57 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-05-27 05:24:57 +0000 |
commit | 6628b3608b7c30da683c03d1c18d94706f991db5 (patch) | |
tree | dd264f20c26c7a3352eb11128b06fb368dbc1f9c | |
parent | 43750f2338ccfc28518234374c9a0e2af424eb61 (diff) | |
download | perl-MDK-Common-6628b3608b7c30da683c03d1c18d94706f991db5.tar perl-MDK-Common-6628b3608b7c30da683c03d1c18d94706f991db5.tar.gz perl-MDK-Common-6628b3608b7c30da683c03d1c18d94706f991db5.tar.bz2 perl-MDK-Common-6628b3608b7c30da683c03d1c18d94706f991db5.tar.xz perl-MDK-Common-6628b3608b7c30da683c03d1c18d94706f991db5.zip |
use "our" instead of "use vars"
-rw-r--r-- | MDK/Common/DataStructure.pm | 8 | ||||
-rw-r--r-- | MDK/Common/File.pm | 8 | ||||
-rw-r--r-- | MDK/Common/Func.pm | 8 | ||||
-rw-r--r-- | MDK/Common/Math.pm | 12 | ||||
-rw-r--r-- | MDK/Common/String.pm | 8 | ||||
-rw-r--r-- | MDK/Common/System.pm | 16 | ||||
-rw-r--r-- | MDK/Common/Various.pm | 8 |
7 files changed, 34 insertions, 34 deletions
diff --git a/MDK/Common/DataStructure.pm b/MDK/Common/DataStructure.pm index 26c8b0f..79e4aa0 100644 --- a/MDK/Common/DataStructure.pm +++ b/MDK/Common/DataStructure.pm @@ -117,10 +117,10 @@ use MDK::Common::Math; use MDK::Common::Func; -use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK); -@ISA = qw(Exporter); -@EXPORT_OK = qw(sort_numbers ikeys add2hash add2hash_ put_in_hash member invbool listlength deref deref_array is_empty_array_ref is_empty_hash_ref uniq uniq_ difference2 intersection next_val_in_array group_by2 list2kv); -%EXPORT_TAGS = (all => [ @EXPORT_OK ]); +use Exporter; +our @ISA = qw(Exporter); +our @EXPORT_OK = qw(sort_numbers ikeys add2hash add2hash_ put_in_hash member invbool listlength deref deref_array is_empty_array_ref is_empty_hash_ref uniq uniq_ difference2 intersection next_val_in_array group_by2 list2kv); +our %EXPORT_TAGS = (all => [ @EXPORT_OK ]); sub sort_numbers { sort { $a <=> $b } @_ } diff --git a/MDK/Common/File.pm b/MDK/Common/File.pm index c4e1ad4..bb994fb 100644 --- a/MDK/Common/File.pm +++ b/MDK/Common/File.pm @@ -124,10 +124,10 @@ L<MDK::Common> =cut -use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK); -@ISA = qw(Exporter); -@EXPORT_OK = qw(dirname basename cat_ cat_or_die cat__ output output_p output_with_perm append_to_file linkf symlinkf renamef mkdir_p rm_rf cp_f cp_af touch all all_files_rec glob_ substInFile expand_symlinks openFileMaybeCompressed catMaybeCompressed); -%EXPORT_TAGS = (all => [ @EXPORT_OK ]); +use Exporter; +our @ISA = qw(Exporter); +our @EXPORT_OK = qw(dirname basename cat_ cat_or_die cat__ output output_p output_with_perm append_to_file linkf symlinkf renamef mkdir_p rm_rf cp_f cp_af touch all all_files_rec glob_ substInFile expand_symlinks openFileMaybeCompressed catMaybeCompressed); +our %EXPORT_TAGS = (all => [ @EXPORT_OK ]); sub dirname { local $_ = shift; s|[^/]*/*\s*$||; s|(.)/*$|$1|; $_ || '.' } sub basename { local $_ = shift; s|/*\s*$||; s|.*/||; $_ } diff --git a/MDK/Common/Func.pm b/MDK/Common/Func.pm index eca3493..82811bb 100644 --- a/MDK/Common/Func.pm +++ b/MDK/Common/Func.pm @@ -171,10 +171,10 @@ L<MDK::Common> use MDK::Common::Math; -use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK); -@ISA = qw(Exporter); -@EXPORT_OK = qw(may_apply if_ if__ fold_left mapn mapn_ find any every map_index each_index grep_index find_index map_each grep_each partition before_leaving catch_cdie cdie); -%EXPORT_TAGS = (all => [ @EXPORT_OK ]); +use Exporter; +our @ISA = qw(Exporter); +our @EXPORT_OK = qw(may_apply if_ if__ fold_left mapn mapn_ find any every map_index each_index grep_index find_index map_each grep_each partition before_leaving catch_cdie cdie); +our %EXPORT_TAGS = (all => [ @EXPORT_OK ]); sub may_apply { $_[0] ? $_[0]->($_[1]) : (@_ > 2 ? $_[2] : $_[1]) } diff --git a/MDK/Common/Math.pm b/MDK/Common/Math.pm index c1ce753..5ed9a61 100644 --- a/MDK/Common/Math.pm +++ b/MDK/Common/Math.pm @@ -112,14 +112,14 @@ L<MDK::Common> =cut -use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK $PRECISION $PI); -@ISA = qw(Exporter); -@EXPORT_OK = qw($PI even odd sqr sign round round_up round_down divide min max or_ and_ sum product factorial); -%EXPORT_TAGS = (all => [ @EXPORT_OK ]); +use Exporter; +our @ISA = qw(Exporter); +our @EXPORT_OK = qw($PI even odd sqr sign round round_up round_down divide min max or_ and_ sum product factorial); +our %EXPORT_TAGS = (all => [ @EXPORT_OK ]); -$PRECISION = 10; -$PI = 3.1415926535897932384626433832795028841972; +our $PRECISION = 10; +our $PI = 3.1415926535897932384626433832795028841972; sub even { $_[0] % 2 == 0 } sub odd { $_[0] % 2 == 1 } diff --git a/MDK/Common/String.pm b/MDK/Common/String.pm index 80c6598..40eee1d 100644 --- a/MDK/Common/String.pm +++ b/MDK/Common/String.pm @@ -67,10 +67,10 @@ L<MDK::Common> =cut -use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK); -@ISA = qw(Exporter); -@EXPORT_OK = qw(bestMatchSentence formatList formatError formatTimeRaw formatLines formatAlaTeX begins_with warp_text); -%EXPORT_TAGS = (all => [ @EXPORT_OK ]); +use Exporter; +our @ISA = qw(Exporter); +our @EXPORT_OK = qw(bestMatchSentence formatList formatError formatTimeRaw formatLines formatAlaTeX begins_with warp_text); +our %EXPORT_TAGS = (all => [ @EXPORT_OK ]); # count the number of character that match diff --git a/MDK/Common/System.pm b/MDK/Common/System.pm index 4ad4aea..0f3dee8 100644 --- a/MDK/Common/System.pm +++ b/MDK/Common/System.pm @@ -177,13 +177,13 @@ L<MDK::Common> use MDK::Common::Math; use MDK::Common::File; -use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK %compat_arch $printable_chars $sizeof_int $bitof_int); #); -@ISA = qw(Exporter); -@EXPORT_OK = qw(%compat_arch $printable_chars $sizeof_int $bitof_int arch distrib typeFromMagic list_passwd list_home list_skels list_users syscall_ psizeof availableMemory availableRamMB gettimeofday unix2dos whereis_binary getVarsFromSh setVarsInSh setVarsInShMode setExportedVarsInSh setExportedVarsInCsh template2file template2userfile read_gnomekderc update_gnomekderc fuzzy_pidofs); #); -%EXPORT_TAGS = (all => [ @EXPORT_OK ]); +use Exporter; +our @ISA = qw(Exporter); +our @EXPORT_OK = qw(%compat_arch $printable_chars $sizeof_int $bitof_int arch distrib typeFromMagic list_passwd list_home list_skels list_users syscall_ psizeof availableMemory availableRamMB gettimeofday unix2dos whereis_binary getVarsFromSh setVarsInSh setVarsInShMode setExportedVarsInSh setExportedVarsInCsh template2file template2userfile read_gnomekderc update_gnomekderc fuzzy_pidofs); #); +our %EXPORT_TAGS = (all => [ @EXPORT_OK ]); -%compat_arch = ( #- compatibilty arch mapping. +our %compat_arch = ( #- compatibilty arch mapping. 'noarch' => undef, 'ia32' => 'noarch', 'i386' => 'ia32', @@ -205,9 +205,9 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK %compat_arch $printable_chars $sizeof_i 'ia64' => 'noarch', ); -$printable_chars = "\x20-\x7E"; -$sizeof_int = psizeof("i"); -$bitof_int = $sizeof_int * 8; +our $printable_chars = "\x20-\x7E"; +our $sizeof_int = psizeof("i"); +our $bitof_int = $sizeof_int * 8; sub arch() { diff --git a/MDK/Common/Various.pm b/MDK/Common/Various.pm index 7072aad..96e76d3 100644 --- a/MDK/Common/Various.pm +++ b/MDK/Common/Various.pm @@ -96,10 +96,10 @@ L<MDK::Common> =cut -use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK); -@ISA = qw(Exporter); -@EXPORT_OK = qw(first second top to_bool to_int to_float bool2text bool2yesno text2bool chomp_ backtrace internal_error noreturn); -%EXPORT_TAGS = (all => [ @EXPORT_OK ]); +use Exporter; +our @ISA = qw(Exporter); +our @EXPORT_OK = qw(first second top to_bool to_int to_float bool2text bool2yesno text2bool chomp_ backtrace internal_error noreturn); +our %EXPORT_TAGS = (all => [ @EXPORT_OK ]); sub first { $_[0] } |