Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: How do I un-map this code?

by Plankton (Vicar)
on Mar 21, 2008 at 17:55 UTC ( [id://675490]=note: print w/replies, xml ) Need Help??


in reply to Re: How do I un-map this code?
in thread How do I un-map this code?

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^3: How do I un-map this code?
by jhourcle (Prior) on Mar 21, 2008 at 18:04 UTC
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re^3: How do I un-map this code?
by chromatic (Archbishop) on Mar 21, 2008 at 19:07 UTC
    I can't see how adding map to the mess would make it more readable.

    It removes the need for (useless) temporary variables and automatically handles the case of empty lists without any special checking.

Re^3: How do I un-map this code?
by eyepopslikeamosquito (Archbishop) on Mar 21, 2008 at 22:02 UTC

    And as far as '_' meaning private ... I guess that would be private by convention since Perl doesn't really have any private methods or members, but conventions are only good if to tell people about them and this particular convention isn't documented anywhere.
    On the contrary, this widely used naming convention is documented in the core Perl docs, the Camel book, and in many other places:
    • From Perl style: "You can use a leading underscore to indicate that a variable or function should not be used outside the package that defined it."
    • From Perl Best Practices, Chapter 3 Naming Conventions: 3.10 "Prefix "for internal use only" subroutines with an underscore."

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://675490]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-24 01:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found