Pathologically Eclectic Rubbish Lister | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
"config.pm" is not a good name for a module. "Config.pm" is a built-in module to perl. Names beggining with lowercase letters should be considered reserved for pragmas; they are considered "special". "Something::Config" would probably be okay, however.
As for your actual question, you could probably make an object that encapsulated this configuration stuff If I declare a scalar as a constant in a module then export that scalar will it remain a constant? "constants", as you are referring to, are actually functions that have a prototype of () (explictly no arguments), and thus are inlined by perl. You will get this optimization as long as the function is imported (so perl what to use and that it should inline it) when the relevant code is compiled.
In reply to Re: Coding Perl With Style
by wog
|
|