Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Perl-Critic CPAN distribution.

Report information
The Basics
Id: 49016
Status: resolved
Priority: 0/
Queue: Perl-Critic

People
Owner: Nobody in particular
Requestors: jo3 [...] sanger.ac.uk
Cc:
AdminCc:

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



Subject: Perl::Critic::Policy::Variables::ProhibitPunctuationVars
Date: Wed, 26 Aug 2009 09:21:31 +0100
To: bug-Perl-Critic [...] rt.cpan.org
From: John O'Brien <jo3 [...] sanger.ac.uk>
In Version 1.104 the above policy complains about the following code. $self->{table} .= sprintf " %5d\t%7d %6d\t%2d %-25s\t%s\n", $self->{workflow_id}, $npgan_job->id_npgan_job(), $npgan_job->run_id(), $npgan_job->lane_number(), $npgan_job->st_library_name(), $tarball{$npgan_job}; Giving the warning: "Magic punctuation variable used in interpolated string at line 127, column 35. See page 79 of PBP." We have tracked it down to the "%-25s" portion and changing this to "%25s" removes the warning. As there is no %- magic variable, is this an error in a regex used for spotting this kind of policy violation? John O'Brien -- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.
Subject: Re: [rt.cpan.org #49016] Perl::Critic::Policy::Variables::ProhibitPunctuationVars
Date: Wed, 26 Aug 2009 07:34:33 -0500
To: bug-Perl-Critic [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
John O'Brien via RT wrote: Show quoted text
> We have tracked it down to the "%-25s" portion and changing this to > "%25s" removes the warning. > > As there is no %- magic variable, is this an error in a regex used for > spotting this kind of policy violation?
Yeah, I noticed this too at work yesterday. There is, of course, a %- variable, but obviously it won't get interpolated in a string. I'm going to wait a couple of days for any more stupid, simple problems to show up and I'll put out a fix for this.
Subject: Re: [rt.cpan.org #49016] Perl::Critic::Policy::Variables::ProhibitPunctuationVars
Date: Mon, 07 Sep 2009 16:54:26 -0500
To: bug-Perl-Critic [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
Fix released in v1.105.