RE: [code-review] Bencode.pm

"Hodges, Paul" <Paul.Hodges-ntWzkUHD06N8olp/[email protected]> Thu, 2 Oct 2003 12:31:28 -0400
Newsgroups gmane.comp.lang.perl.code-review-ladder
Message-ID <9C375DDD9B669243A2D78FCD607E894003E4FC7D@bremo-jg>
While I agree with the principle, and would never chastise anyone for being
explicit, the "hanging reference" version of returns from subs is a staple
of Perl style, isn't it? Explicit return statements are probably a good
thing, but a variable in an otherwise effectively void context (allowing the
context of the subroutine to determine) has no other real use. That's a
style issue.

> -----Original Message-----
> From: code-review-ladder-admin-wool9L35kiek0rBIEb6pKdBc4/[email protected]
> [mailto:code-review-ladder-admin-wool9L35kiek0rBIEb6pKdBc4/[email protected]]On Behalf Of
> Kristofer Hoch
> Sent: Thursday, October 02, 2003 11:17 AM
> To: code-review-ladder-wool9L35kiek0rBIEb6pKdBc4/[email protected]
> Cc: code-review-ladder-wool9L35kiek0rBIEb6pKdBc4/[email protected]
> Subject: Re: [code-review] Bencode.pm
> 
> I concur.
> 
> Kristofer.
> --- Jeremy Zawodny <Jeremy-LaWf/[email protected]> wrote:
> > I'd use an explicit "return $foo" to return values from a subroutine.
> > That way it doesn't look like a stray variable that's hanging out at
> > the end, not really doing anything.
> > 
> > If it's explicit, there's no guessing required.


*****
"The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential, proprietary, and/or
privileged material.  Any review, retransmission, dissemination or other use
of, or taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.  If you received
this in error, please contact the sender and delete the material from all
computers.60"