On 02/03/2008, ik <[EMAIL PROTECTED]> wrote: > I keep on seeing people using regular "my" or "our" for data that > should not be changed. Why most Perl developers does not use the "use > constant" way instead ?
Damian Conway suggests not to 'use constant' in the book "Perl Best Practices" and i totally agree with him about this. It is annoying - it doesn't look like a variable and it cannot be interpolated. He suggests a couple of other solutions, such as 'use Readonly', but unfortunately it is not a part of standard Perl library. I avoid 'use constant' unless i have a reason to use it (such as consistency with legacy code). I just use 'my' most of the time. It's not such a big deal and there are worse problems with Perl than the ability to change values of constants. -- Amir Elisha Aharoni English - http://aharoni.wordpress.com Hebrew - http://haharoni.wordpress.com "We're living in pieces, I want to live in peace." - T. Moore _______________________________________________ Perl mailing list [email protected] http://perl.org.il/mailman/listinfo/perl
