Interesting question. The compelling criteria for me is consistency. A function/method call is a function/method call regardless of the number of parameters passed. So I include the () even if no parameters are passed in the call.
However, like Athanasius I use the Perl built in functions like length without parens. If pressed for a justification for the inconsistency I'd suggest functions like length are more like operators.
Very likely my long C++ experience biases what "looks right" to my eye in this case. My path to my current Perl style almost exactly mimics Athanasius's tale. I would make pretty much the same arguments, except in this small case where I'd apply the "make things that are the same look the same" rule - a call is a call regardless of the number of parameters.
In reply to Re: To parens or not parens in chained method calls
by GrandFather
in thread To parens or not parens in chained method calls
by stevieb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |