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

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

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



Subject: Builtin function called with parentheses (possible false positive)
Builtin function called with parentheses at line 4, column 30. See page 13 of PBP. 1 #!/usr/bin/perl 2 use strict; 3 4 my $year = 1900 + (localtime time() )[5]; 5 functions that do not take parameters, like time() and more distinctly written with parens. consider: my $time = time; # Eh? Please say time() While it's clear that this (without parens) is ok: my $i = oct 21;
Subject: Re: [rt.cpan.org #56635] Builtin function called with parentheses (possible false positive)
Date: Sat, 17 Apr 2010 17:44:46 -0500
To: bug-Perl-Critic [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
On 4/15/10 8:05 AM, Jari Aalto via RT wrote: Show quoted text
> Builtin function called with parentheses at line 4, column 30. See page > 13 of PBP. > > 1 #!/usr/bin/perl > 2 use strict; > 3 > 4 my $year = 1900 + (localtime time() )[5]; > 5 > > functions that do not take parameters, like time() and more distinctly > written with parens. consider: > > my $time = time; # Eh? Please say time() > > While it's clear that this (without parens) is ok: > > my $i = oct 21;
I'd say that it's a difference of opinion. But if you wanted to write a patch that added an option to make no-argument functions require parameters, I'd take it.