Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Re: Perl Naming Conventions

by leriksen (Curate)
on Apr 29, 2003 at 02:22 UTC ( [id://253885]=note: print w/replies, xml ) Need Help??


in reply to Re: Perl Naming Conventions
in thread Perl Naming Conventions

a thing I like to do is put a leading underscore on methods that should not be called directly e.g.
... sub external { ... _internal(); ... } sub _internal { }

this is just a hint to the class user, of course. I also do the same for function-style modules, I put required methods in EXPORT, internal functions in EXPORT_OK, and provide :std and :test tags in EXPORT_TAGS that are EXPORT and EXPORT_OK e.g.
@EXPORT = qw(external interface); @EXPORT_OK = qw(_internal _interface); %EXPORT_TAGS = (STD => \@EXPORT, TEST => \@EXPORT_OK);

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-26 04:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found