Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Test-Strict CPAN distribution.

Report information
The Basics
Id: 55186
Status: resolved
Priority: 0/
Queue: Test-Strict

People
Owner: Nobody in particular
Requestors: flichtenheld [...] astaro.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.14
Fixed in: (no value)



Subject: Be less strict about filenames when calling syntax_ok directly
If I call all_perl_files_ok() it is obviously ok to be strict about which files to check to not produce any false positives. If I call syntax_ok() directly, I'm probably sure that this file is a Perl file and do not care about the filename. Therefor I would propose the following patch: diff -ur Test-Strict-0.14.orig/lib/Test/Strict.pm Test-Strict-0.14/lib/Test/Strict.pm --- Test-Strict-0.14.orig/lib/Test/Strict.pm 2010-02-14 01:49:40.000000000 +0100 +++ Test-Strict-0.14/lib/Test/Strict.pm 2010-03-03 15:25:57.000000000 +0100 @@ -165,11 +165,6 @@ } my $is_script = _is_perl_script($file); - if (not $is_script and not _is_perl_module($file)) { - $Test->ok( 0, $test_txt ); - $Test->diag( "$file is not a perl module or a perl script" ); - return; - } # Set the environment to compile the script or module my $inc = join(' -I ', map{ qq{"$_"} } @INC ) || '';
Will be in 0.16. Thanks for the patch.