in reply to Perl Naming Conventions

While there are things like perlstyle and numerous coding style guides on the web, it is still a matter of personal prefrence.

I myself got used (or still trying) to the following:

One other thing I want to add is that coding style is not something that you think about, develop, and then use forever. It changes slowly, but constantly with the experience. Especially, if that experience is with someone else's code. :)

P.S.: In general, I don't like capitalization, since it requires me to press more keys then I need to. So I use it ONLY for significant names, which are obviously ONLY the modules. :)

P.P.S: And, yes, I beleive that set_value() is easier to read then setValue()

Leonid Mamtchenkov

Replies are listed 'Best First'.
Re: Re: Perl Naming Conventions
by leriksen (Curate) on Apr 29, 2003 at 02:22 UTC
    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);