Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Devel-CheckOS CPAN distribution.

Report information
The Basics
Id: 84150
Status: rejected
Priority: 0/
Queue: Devel-CheckOS

People
Owner: Nobody in particular
Requestors: peter [...] vereshagin.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.71
Fixed in: (no value)



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; }
Show quoted text
> 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'
Then it's obvious that the bug is in dzil. Show quoted text
> The messages themselves may happen to be a product of Perl::Critic or > other such module.
Probably. Use of Perl::Critic on any code other than your own is a bug. Show quoted text
> 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)' : '';
If this is coming from Perl::Critic, then you've found a bug in Perl::Critic. Rejected, bug reported to wrong queue.