Subject: | Modern::Perl for strict and warnings _ok()s |
Hello.
The Modern::Perl distribution claims to enable the both strict and
warnings for the current package.
I wish Test::Strict to treat Modern::Perl as well as Moose and Mouse
with the patch supplied.
Thank you.
Subject: | test-strict-modern-perl.patch |
--- /var/lib/cpan/perl5/perlbrew/perls/perl-5.16.1/lib/site_perl/5.16.1/Test/Strict.pm.orig 2012-10-23 01:06:31.000000000 +0400
+++ /var/lib/cpan/perl5/perlbrew/perls/perl-5.16.1/lib/site_perl/5.16.1/Test/Strict.pm 2012-10-23 01:07:25.000000000 +0400
@@ -213,7 +213,9 @@
next if (/^\s*#/); # Skip comments
next if (/^\s*=.+/ .. /^\s*=(cut|back|end)/); # Skip pod
last if (/^\s*(__END__|__DATA__)/); # End of code
- if ( /\buse\s+strict\s*;/ or /\buse\s+Moose\b/ or /\buse\s+Mouse\b/ ) {
+ if ( /\buse\s+strict\s*;/ or /\buse\s+Moose\b/ or /\buse\s+Mouse\b/
+ or /\buse\s+Modern::Perl\b/
+ ) {
$Test->ok(1, $test_txt);
return 1;
}
@@ -264,7 +266,9 @@
next if (/^\s*#/); # Skip comments
next if (/^\s*=.+/ .. /^\s*=(cut|back|end)/); # Skip pod
last if (/^\s*(__END__|__DATA__)/); # End of code
- if ( /\buse\s+warnings(\s|::|;)/ or /\buse\s+Moose\b/ or /\buse\s+Mouse\b/ ) {
+ if ( /\buse\s+warnings(\s|::|;)/ or /\buse\s+Moose\b/ or /\buse\s+Mouse\b/
+ or /\buse\s+Modern::Perl\b/
+ ) {
$Test->ok(1, $test_txt);
return 1;
}