Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Embracing functions with parentheses

by jbrugger (Parson)
on Mar 16, 2005 at 09:58 UTC ( #439890=note: print w/ replies, xml ) Need Help??


in reply to Embracing functions with parentheses

Our own functions are easy to recognice due to the fact we have to program conform to a predefined coding standard.
eg:
funcions are named using camelnotation, we use an indentation of 4 spaces(tab) 'private' functions have an _ prefix (i know they do not really exist in perl, but this way we know a function is ment to be private) etc.
Next we allways use strict and have warnings on, and we code with the idea that readability is more important than a fast and unreadable algorithm, and we try to avoid perlmagic as much as possible.

package Just_A_Package_Name use strict; sub _privateFunctionName() { my $self = shift; my ($otherItem) = @_; } sub publicFunctionName(){ ... } # So we'd rather write foreach my $item (@array) { # than foreach (@array) {


Comment on Re: Embracing functions with parentheses
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://439890]
help
Chatterbox?
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: (8)
As of 2015-07-07 11:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (88 votes), past polls