develooper Front page | perl.perl5.porters | Postings from June 2008

Re: Control flow ops, dead code, warnings

Thread Previous | Thread Next
From:
Rafael Garcia-Suarez
Date:
June 28, 2008 13:30
Subject:
Re: Control flow ops, dead code, warnings
Message ID:
b77c1dce0806281330i72828c5au5c6a51db07b005c0@mail.gmail.com
2008/6/28 Yuval Kogman <nothingmuch@woobling.org>:
> Under use warnings we get warnings for useless use in void context.
>
> A somewhat related thing is expressions which involve two
> conflicting types of control flow:
>
>        my $value = return "Foo";
>
>        redo && foo();
>
> etc.
>
> Maybe this is worth a warning, since that code can never be reached?

Why add warnings for weird constructs that almost never appear in the wild ?

Thread Previous | 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