diff options
-rw-r--r-- | perl-MDK-Common.spec | 5 | ||||
-rwxr-xr-x | perl_checker | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/perl-MDK-Common.spec b/perl-MDK-Common.spec index bfc1c40..2f781f8 100644 --- a/perl-MDK-Common.spec +++ b/perl-MDK-Common.spec @@ -2,7 +2,7 @@ # do not change the version here, change in MDK/Common.pm.pl %define version THEVERSION -%define release 16mdk +%define release 17mdk Summary: Various simple functions Name: perl-MDK-Common @@ -50,6 +50,9 @@ rm -rf $RPM_BUILD_ROOT # MODIFY IN THE CVS: cvs.mandrakesoft.com:/cooker soft/perl-MDK-Common %changelog +* Thu Oct 17 2002 Pixel <pixel@mandrakesoft.com> 1.0.3-17mdk +- add a check for function call PKG::f instead of PKG::f() + * Fri Sep 6 2002 Pixel <pixel@mandrakesoft.com> 1.0.3-16mdk - MDK::Common::System::update_gnomekderc: fix adding lines to the last section when it doesn't end with a cr diff --git a/perl_checker b/perl_checker index 9d2788e..c40c505 100755 --- a/perl_checker +++ b/perl_checker @@ -205,7 +205,15 @@ sub syntax_warnings { } sub syntax_warnings_after_removing_strings_and_regexps { + local $_ = $_; + s/\bqw\([^)]*\)/'foo'/g; + if (my ($before, $f, $pkg, $after) = /(.*[^a-zA-Z0-9_:@*%&\$])((\w+::)+\w+)\s*([^a-zA-Z0-9_(: {].*)/) { + if ($before !~ /(sub|use|package|require|new|->)\s*$/ && $after !~ /^->/) { + $pkg =~ s/::$//; + warn_(qq($f must be written $f() otherwise it will not work if "use $pkg" is replaced by "require $pkg"), info()); + } + } if (/\}->([{\[])/) { warn_(qq("}->$2" is better written "}$2"), info()); |