Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Perl Best Practices for naming variables

by borisz (Canon)
on Aug 07, 2005 at 11:11 UTC ( #481654=note: print w/ replies, xml ) Need Help??


in reply to Perl Best Practices for naming variables

Without reading the book.
I refuse to append _ref to my refs. Since a real program is much more readable with shorter meaningfull names.

Boris


Comment on Re: Perl Best Practices for naming variables
Re^2: Perl Best Practices for naming variables
by Happy-the-monk (Monsignor) on Aug 07, 2005 at 14:07 UTC

    There sure is more than one way to name your references.

    scnr ;-), Sören

      There sure is more than one way to name your references.

      $rsReally = \"yes really"; $raReally = [qw"yes really"]; $rhReally = {qw"yes really"};

        In Perl, the prefixes of sv, av, and hv might be more recognizable. Well, at least for people who have seen discussions that touched on internals that used the standard (and ubiquitous) abbreviations that are used internally.

        At least, I have sometimes used names like $sv_xml when I saw a value in calling out "this is a reference (of this type)" in the variable name.

        - tye        

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2014-08-29 19:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (287 votes), past polls