Subject: | Critic from Dist::Zilla plugin |
Hello.
First, I'd like to thank you for this wonderful module.
I try to Devel::CheckOS from the corresponding Dist::Zilla plugin (Dist::Zilla::Plugin::AssertOS, to be precise). The messages in question may be the warnings or errors, but these are the only of such kind I meet (while I use the tens of plugins for a build).
I'm not sure if this is the problem od Devel::CheckOS by itself as I can not reproduce these messages otherwise than with 'dzil build' but I'm sure they are about the Devel::CheckOS code.
The messages themselves may happen to be a product of Perl::Critic or other such module.
The DZil's plugin itself DWIMs fine till the moment.
For the case of how much is that important I'd point that the Dist::Zilla plugin includes Devel::CheckOS code thus distributing such a may be really minor problem but who knows how strict can be the other module's application environment about it.
Here are the messages in question:
There is no previous '(' to match a ')' on line 179
179: my $case_flag = File::Spec->case_tolerant ? '(?i)' : '';
^
179: my $case_flag = File::Spec->case_tolerant ? '(?i)' : '';
-^
found String where operator expected (previous token underlined)
179: my $case_flag = File::Spec->case_tolerant ? '(?i)' : '';
-----^
found String where operator expected (previous token underlined)
201: } File::Find::Rule->file()->name('*.pm')->in(
-^
found . where term expected (previous token underlined)
220: Takes the name of an OS 'family' and returns a list of all its m ...
^
found bareword where operator expected
223: If called on something that isn't a family, you get an empty lis ...
^
found bareword where operator expected
335: final indentation level: 2
Final nesting depth of '{'s is 2
The most recent un-matched '{' is on line 178
178: if (!$re_Devel) {
^
335: To see 1 non-critical warnings rerun with -w
335: To save a full .LOG file rerun with -g
The (obvious) patch supplied resolves the issue for me.
My environment is:
perl-5.16.2 built for i386-freebsd (-7.4)
Subject: | Dveel-CheckOS-1.71-dzp-00.patch |
--- a/lib/Devel/CheckOS.pm
+++ b/lib/Devel/CheckOS.pm
@@ -175,7 +175,7 @@ sub list_platforms {
die($@) if($@);
if (!$re_Devel) {
- my $case_flag = File::Spec->case_tolerant ? '(?i)' : '';
+ my $case_flag = File::Spec->case_tolerant() ? '(?i)' : '';
$re_Devel = qr/$case_flag ^Devel$/x;
$re_AssertOS = qr/$case_flag ^AssertOS$/x;
}