Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Any differences between method and method()?

by influx (Beadle)
on Aug 18, 2012 at 11:06 UTC ( #988196=note: print w/ replies, xml ) Need Help??


in reply to Any differences between method and method()?

If you've predeclared the subroutine you can leave the '()' off. I generally use it anyway so any maintainers of my code KNOW its a subroutine without even thinking.


Comment on Re: Any differences between method and method()?
Re^2: Any differences between method and method()?
by dave_the_m (Parson) on Aug 18, 2012 at 11:20 UTC
    If you've predeclared the subroutine you can leave the '()' off.
    That's only relevant for function calls; for method calls, predeclaring makes no difference. And to the OP, there's no difference whether you have the () or not.

    Dave.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2014-10-31 05:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (214 votes), past polls