Subject: | Moose compatibility? |
Hello,
As usual, thanks for maintaining this module :)
I'm starting to dig into Moose and realized that I'm starting to get a
lot of test failures because of no "strict" enabled...
I have no idea if you think the idea is good or not, but I have applied
an patch that recognizes "use Moose" to satisfy strict/warnings checks.
Thanks again!
P.S. I wonder what your perspective on this is because then we would
have to add support for Mouse, classes that derive from Moose::Base, etc
etc... It's a maze :(
--
~Apocalypse
Subject: | Strict.pm.diff |
--- Strict.pm.orig 2009-03-26 21:22:27.000000000 +0100
+++ Strict.pm 2009-03-26 21:28:45.000000000 +0100
@@ -203,7 +203,7 @@
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*;/ ) {
+ if ( /\buse\s+strict\s*;/ or /\buse\s+Moose/ ) {
$Test->ok(1, $test_txt);
return 1;
}
@@ -252,7 +252,7 @@
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|::|;)/ ) {
+ if ( /\buse\s+warnings(\s|::|;)/ or /\buse\s+Moose/ ) {
$Test->ok(1, $test_txt);
return 1;
}