use warnings;
use Test::More;
use File::Find::Rule;
use Test::File::Find::Rule;
my $rule = File::Find::Rule->file->name('*.pl')->not_grep(qr/^\s*use\s+strict;/m, sub { 1 });
match_rule_no_result($rule, ".", 'use strict usage');
done_testing();
and the output was :
out put :
ok 1 - use strict usage
1..1
it is always passing the test even when my script doesn't use strict, just like this script which is located inside "." directory. the same code is available as an example at http://search.cpan.org/~fabpot/Test-File-Find-Rule-1.00/lib/Test/File/Find/Rule.pm
any clue ?
F.