[libtest-strict-perl] 01/03: Make syntax_ok check modules without '::' in their names
Florian Schlichting
fsfs at moszumanska.debian.org
Wed Oct 21 20:57:46 UTC 2015
This is an automated email from the git hooks/post-receive script.
fsfs pushed a commit to annotated tag 0.28
in repository libtest-strict-perl.
commit 7a05e97bdc30cc10dd3ca7a95a68e8946364dafe
Author: Petr Šabata <contyk at redhat.com>
Date: Wed Oct 15 17:19:28 2014 +0200
Make syntax_ok check modules without '::' in their names
Currently, syntax_ok() checks modules' syntax only if the name
contains '::', i.e. syntax_ok("My::Module") works while
syntax_ok("MyModule") doesn't. This patch fixes this behaviour.
We still treat the argument as a file path in case no such module
exists.
This is already covered by the test suite.
Signed-off-by: Petr Šabata <contyk at redhat.com>
---
lib/Test/Strict.pm | 1 -
1 file changed, 1 deletion(-)
diff --git a/lib/Test/Strict.pm b/lib/Test/Strict.pm
index cd04287..07caeef 100644
--- a/lib/Test/Strict.pm
+++ b/lib/Test/Strict.pm
@@ -500,7 +500,6 @@ sub _taint_switch {
##
sub _module_to_path {
my $file = shift;
- return $file unless ($file =~ /::/);
my @parts = split /::/, $file;
my $module = File::Spec->catfile(@parts) . '.pm';
foreach my $dir (@INC) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libtest-strict-perl.git
More information about the Pkg-perl-cvs-commits
mailing list