Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: To & or not to & ?

by tilly (Archbishop)
on Nov 12, 2004 at 01:51 UTC ( [id://407241]=note: print w/replies, xml ) Need Help??


in reply to To & or not to & ?

There is no official Perl style. Currently I leave the & off and always put parens in so that I can keep the same style in several languages. YMMV.

However as others have said, if you're using functions from package A in package B, I'd strongly recommend using Exporter in package A so that package B can explicitly import the functions that it uses.

Replies are listed 'Best First'.
Re^2: To & or not to & ?
by digiryde (Pilgrim) on Nov 13, 2004 at 03:03 UTC
    Of all the reasons to or not to &, this one, by Tilly, so that I can keep the same style in several languages. is probably the one I fall back to the most.

    Most of the errors I have to deal with in cross language coding come from programming in one language, then switching to another but still using the other language's syntax (or commands).

    Anything I can do to allow me to code in the language de project (working on several different ones per day) is a blessing.

Log In?
Username:
Password:

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

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

    No recent polls found