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: 57807
Status: open
Priority: 0/
Queue: Perl-Critic

People
Owner: Nobody in particular
Requestors: dolmen [...] cpan.org
Cc:
AdminCc:

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



Subject: Subroutines::ProhibitSubroutinePrototypes: add an exception for constant functions
Download (untitled) / with headers
text/plain 452b
For a definition of "constant functions", see "Constant functions" in perlsub: http://perldoc.perl.org/perlsub.html#Constant-Functions An empty prototype () is required for Perl to consider inlining the function as a constant. So, currently this rule is against a good Perl idiom. Note that using "## no critic ()" as a workaround would be counter-productive as it would make the code less readable. -- Olivier Mengué - http://o.mengue.free.fr/
Subject: Re: [rt.cpan.org #57807] Subroutines::ProhibitSubroutinePrototypes: add an exception for constant functions
Date: Mon, 24 May 2010 20:47:16 -0500
To: bug-Perl-Critic [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
Download (untitled) / with headers
text/plain 498b
On 5/24/10 5:32 PM, Olivier 'dolmen' Mengué via RT wrote: Show quoted text
> For a definition of "constant functions", see "Constant functions" in > perlsub: http://perldoc.perl.org/perlsub.html#Constant-Functions > > An empty prototype () is required for Perl to consider inlining the > function as a constant. > > So, currently this rule is against a good Perl idiom.
I would say that it isn't an idiom: the idiom is to use the constant pragma. How the constant pragma happens to be implemented isn't germane.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.