diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-07-31 12:01:32 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-07-31 12:01:32 +0000 |
commit | ab2b02f3349dbf1960f2af5b43295d1ffa6be040 (patch) | |
tree | e0e74cf29e340614b23f5a039ea9f522ed49a70f /MDK/Common | |
parent | e14829cc6aa3bcb315e330b1bcb5f82676fb26d3 (diff) | |
download | perl-MDK-Common-ab2b02f3349dbf1960f2af5b43295d1ffa6be040.tar perl-MDK-Common-ab2b02f3349dbf1960f2af5b43295d1ffa6be040.tar.gz perl-MDK-Common-ab2b02f3349dbf1960f2af5b43295d1ffa6be040.tar.bz2 perl-MDK-Common-ab2b02f3349dbf1960f2af5b43295d1ffa6be040.tar.xz perl-MDK-Common-ab2b02f3349dbf1960f2af5b43295d1ffa6be040.zip |
- perl_checker: cleaner, more usable (via .perl_checker for -exclude's)
- perl_checker: more stricter syntax rules
- adapt *.pm's to those rules
Diffstat (limited to 'MDK/Common')
-rw-r--r-- | MDK/Common/DataStructure.pm | 3 | ||||
-rw-r--r-- | MDK/Common/File.pm | 3 | ||||
-rw-r--r-- | MDK/Common/Func.pm | 6 | ||||
-rw-r--r-- | MDK/Common/Globals.pm | 6 | ||||
-rw-r--r-- | MDK/Common/Math.pm | 5 | ||||
-rw-r--r-- | MDK/Common/String.pm | 3 | ||||
-rw-r--r-- | MDK/Common/System.pm | 3 | ||||
-rw-r--r-- | MDK/Common/Various.pm | 4 |
8 files changed, 19 insertions, 14 deletions
diff --git a/MDK/Common/DataStructure.pm b/MDK/Common/DataStructure.pm index 6e6ab12..8f44a2e 100644 --- a/MDK/Common/DataStructure.pm +++ b/MDK/Common/DataStructure.pm @@ -1,3 +1,5 @@ +package MDK::Common::DataStructure; + =head1 NAME MDK::Common::DataStructure - miscellaneous list/hash manipulation functions @@ -102,7 +104,6 @@ L<MDK::Common> =cut -package MDK::Common::DataStructure; use MDK::Common::Math; use MDK::Common::Func; diff --git a/MDK/Common/File.pm b/MDK/Common/File.pm index 2715855..413dfa6 100644 --- a/MDK/Common/File.pm +++ b/MDK/Common/File.pm @@ -1,3 +1,5 @@ +package MDK::Common::File; + =head1 NAME MDK::Common::File - miscellaneous file/filename manipulation functions @@ -96,7 +98,6 @@ L<MDK::Common> =cut -package MDK::Common::File; use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK); @ISA = qw(Exporter); diff --git a/MDK/Common/Func.pm b/MDK/Common/Func.pm index 8cca560..6578010 100644 --- a/MDK/Common/Func.pm +++ b/MDK/Common/Func.pm @@ -1,3 +1,5 @@ +package MDK::Common::Func; + =head1 NAME MDK::Common::Func - miscellaneous functions @@ -142,8 +144,6 @@ L<MDK::Common> =cut -package MDK::Common::Func; - use MDK::Common::Math; @@ -180,7 +180,7 @@ sub fold_left(&@) { sub smapn { my $f = shift; my $n = shift; - my @r = (); + my @r; for (my $i = 0; $i < $n; $i++) { push @r, &$f(map { $_->[$i] } @_) } @r } diff --git a/MDK/Common/Globals.pm b/MDK/Common/Globals.pm index 15ca219..1bda892 100644 --- a/MDK/Common/Globals.pm +++ b/MDK/Common/Globals.pm @@ -1,3 +1,5 @@ +package MDK::Common::Globals; + =head1 NAME Shares constant values between modules @@ -13,12 +15,10 @@ Shares constant values between modules =cut -package MDK::Common::Globals; - sub import { my (undef, $name, @globals) = @_; foreach (@globals) { - $name =~ /^\$/ and die q(usage : use MDK::Common::Globals "group", qw($var1 $var2 ...);); + $name =~ /^\$/ and die qq(usage : use MDK::Common::Globals "group", qw(\$var1 \$var2 ...);\n); s/^\$// or die qq(bad parameter to "use MDK::Common::Globals": missing variable ``$_'' should be written ``\$$_''); #); no strict 'refs'; diff --git a/MDK/Common/Math.pm b/MDK/Common/Math.pm index 9118449..faf700e 100644 --- a/MDK/Common/Math.pm +++ b/MDK/Common/Math.pm @@ -1,3 +1,5 @@ +package MDK::Common::Math; + =head1 NAME MDK::Common::Math - miscellaneous math functions @@ -109,7 +111,6 @@ L<MDK::Common> =cut -package MDK::Common::Math; use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK $PRECISION $PI); @ISA = qw(Exporter); @@ -138,7 +139,7 @@ sub product { my $n = 1; $n *= $_ foreach @_; $n } sub factorize { my ($n) = @_; - my @r = (); + my @r; $n == 1 and return [ 1, 1 ]; for (my $k = 2; sqr($k) <= $n; $k++) { diff --git a/MDK/Common/String.pm b/MDK/Common/String.pm index 2894c2b..8ea1c3c 100644 --- a/MDK/Common/String.pm +++ b/MDK/Common/String.pm @@ -1,3 +1,5 @@ +package MDK::Common::String; + =head1 NAME MDK::Common::String - formatting functions @@ -57,7 +59,6 @@ L<MDK::Common> =cut -package MDK::Common::String; use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK); @ISA = qw(Exporter); diff --git a/MDK/Common/System.pm b/MDK/Common/System.pm index 73ba091..f196e83 100644 --- a/MDK/Common/System.pm +++ b/MDK/Common/System.pm @@ -1,3 +1,5 @@ +package MDK::Common::System; + =head1 NAME MDK::Common::System - formatting functions @@ -155,7 +157,6 @@ L<MDK::Common> =cut -package MDK::Common::System; use MDK::Common::Math; use MDK::Common::File; diff --git a/MDK/Common/Various.pm b/MDK/Common/Various.pm index 6489f9d..841d486 100644 --- a/MDK/Common/Various.pm +++ b/MDK/Common/Various.pm @@ -1,3 +1,5 @@ +package MDK::Common::Various; + =head1 NAME MDK::Common::Various - miscellaneous functions @@ -94,8 +96,6 @@ L<MDK::Common> =cut -package MDK::Common::Various; - 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); |