Jeff 'japhy' Pinyan wrote:
 > It's important to know that those "constants" aren't as efficient as 
their
 > non-method syntax cousins:
 >
 >   package FOO;
 >   use constant BAR => 10;
 >
 >   package main;
 >   print FOO::BAR;  # at compile-time, Perl makes that 'print 10'
 >   print FOO->BAR;  # FOO->BAR doesn't become 10 until run-time
 >
 > So you're not saving anything.  In fact, I bet THAT is SLOWER than
 > $FOO::BAR.  *AND* it won't interpolate (easily) in strings.  All the more
 > reasons to use real scalars.

well, slower is fine with me, as long as it's FAST ENOUGH for my needs.
i like the way constants look; they stand out compared to variables.

-- 
dave



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to