Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re (tilly) 2: lifetime of refs to DBI handles passed to sub as hash elements and assigned to scalar within it

by tilly (Archbishop)
on Aug 31, 2001 at 01:00 UTC ( [id://109208]=note: print w/replies, xml ) Need Help??


in reply to Re: lifetime of refs to DBI handles passed to sub as hash elements and assigned to scalar within it
in thread lifetime of refs to DBI handles passed to sub as hash elements and assigned to scalar within it

People are divided on whether or not to use &. While you are right that you can forget parentheses, you can also get bitten by naming your function with a built-in name.

And if you don't use &, then there are arguments about using parentheses. If you don't use them and you use strict.pm, then for the cost of having to predeclare functions you get typo checking on your functions. Of course then you have to worry about precedence errors and people misunderstanding you.

Personally I don't use & and do use parentheses. But I wouldn't say that that choice is the One True Rule that everyone should follow...

  • Comment on Re (tilly) 2: lifetime of refs to DBI handles passed to sub as hash elements and assigned to scalar within it

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (1)
As of 2024-04-25 04:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found