develooper Front page | perl.perl5.porters | Postings from July 2013

[perl #59802] return 0 or die;

Thread Next
From:
James E Keenan via RT
Date:
July 13, 2013 00:42
Subject:
[perl #59802] return 0 or die;
Message ID:
rt-3.6.HEAD-2552-1373676137-628.59802-15-0@perl.org
On Tue Feb 19 02:54:23 2013, nicholas wrote:
> On Tue, Feb 19, 2013 at 11:44:21AM +0100, Dr.Ruud wrote:
> > On 2013-02-19 03:03, demerphq wrote:
> 
> > > Well, Im not going to take it over, but IMO:
> > >
> > > return $x
> > >    or die "...";
> > >
> > > should warn or something.
> > >
> > > So maybe the ticket should be marked stalled and not closed?
> > 
> > Indeed, the requested change is to warn on popular kinds of unreachable 
> > code, for example:
> > 
> >    return ... or ...;
> 
> (subexpression that always causes control flow) [operator] ...
> 
> where ... is unreachable.
> 
> > Or leave it to perlcritic/perltidy?
> 
> The code that we're suggesting should warn, is buggy as written. I don't
> think that that's really a "tidy" issue, or even a style issue.
> 
> To my mind, it's a legitimate todo.
> 
> Nicholas Clark
> 

Is there anyone actually willing to take on the job of creating a
warning that will run when code is unreachable?

Thank you very much.
Jim Keenan

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=59802

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About