Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: To & or not to & ?

by tilly (Archbishop)
on Nov 12, 2004 at 01:51 UTC ( #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?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2021-10-24 19:56 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (89 votes). Check out past polls.