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

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

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



For the policy [Subroutines::RequireFinalReturn], the builtin 'exec' should be added to the list of ways to end the sub safely.
Subject: Re: [rt.cpan.org #37672]
Date: Mon, 14 Jul 2008 09:28:35 -0500
To: bug-Perl-Critic [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
Will Coleda via RT wrote: Show quoted text
> For the policy [Subroutines::RequireFinalReturn], the builtin 'exec' > should be added to the list of ways to end the sub safely.
Agreed. Fixed.
Subject: Re: [rt.cpan.org #37672]
Date: Tue, 22 Jul 2008 08:14:09 -0700
To: bug-Perl-Critic [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
Elliot Shank via RT wrote: Show quoted text
> Will Coleda via RT wrote:
>> For the policy [Subroutines::RequireFinalReturn], the builtin 'exec' >> should be added to the list of ways to end the sub safely.
> > Agreed. Fixed.
Released in v1.090.
Umm, to chuck in my 2 cents worth, I think exec returns if it can't execute the program. Eg. sub foo { exec 'nosuchprogram'; } foo(); print "didn't exec\n";
Subject: Re: [rt.cpan.org #37672] [Subroutines::RequireFinalReturn] - allow 'exec', too.
Date: Thu, 24 Jul 2008 18:44:08 -0700
To: bug-Perl-Critic [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
Kevin Ryde via RT wrote: Show quoted text
> Umm, to chuck in my 2 cents worth, I think exec returns if it can't > execute the program.
True, but under warnings you get a fun message that you have to work around.
This appears to me to be a freebie for the "Perl-Critic needs your help" effort. - Perl::Critic::Policy::Subroutines::RequireFinalReturn accepts an 'exec' in 1.094001. It is advertised a couple messages earlier in the thread as being fixed in 1.09.
On Mon Jul 14 10:29:01 2008, clonezone wrote: Show quoted text
> Will Coleda via RT wrote:
> > For the policy [Subroutines::RequireFinalReturn], the builtin 'exec' > > should be added to the list of ways to end the sub safely.
> > Agreed. Fixed.
If we're allowing 'exec', then perhaps we should also allow 'exit', 'die', and maybe 'croak' and more. kill 9, $$
On Fri Jan 16 21:48:11 2009, KYLE wrote: Show quoted text
> If we're allowing 'exec', then perhaps we should also allow 'exit', > 'die', and maybe 'croak' and more.
The policy already supports those, and the user can specify additional terminal functions via configuration file. This has been released as http://search.cpan.org/~elliotjs/Perl-Critic-1.094001/ Thanks. -Jeff