Funny enough, I changed ways of doing things several times during my career. I remember that I use to make most of my variables CamelCase in the beginning. After reading stuff and meeting other developers and seeing other people's code, I gradually changed.
So now, for variables, I don't use uppercase because Perl itself uses it for internal variables, such as @ARGV or %ENV. You never know, maybe you can stumble on a pre-defined variable by mistake! So CamelCase or snake_case? Well I choose snake_case because in my experience, I often had errors from mistyping one of the letters, for example: $staticAlert instead of $StaticAlert. I think snake_case is easier to read too. I use the same rule for methods or subroutine names.
For modules, I use CamelCase. I don't like modules in lowercase or snake_case because when you have something like this: My::NameSpace::something_to_do, how can you know at first glance if something_to_do is another module or a subroutine of NameSpace? So I stick to CamelCase for modules and that works well for me.
There are no stupid questions, but there are a lot of inquisitive idiots.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||