At 02:32 PM 2/27/04 -0000, Rob Dixon wrote:
>I haven't looked at this at all carefully, but my first guess would be
>be that you need to call the subroutine as if it was one:
>
>  print MyProject::CoreConstants::EarliestValidTimestampAsNumber() + 1, "\n";

Yes, this certainly solves the problem I'm facing.  However, I've been
trying to take the perspective of designing as a reusable module for users
other than myself (just to stay in the habit, even though its unlikely this
particular code will ever be seen by anyone but me), in which case I really
don't want to burden users with having to use that explicit syntax else
stepping into the trap.  I say burden, because from what I've seen most
people use the paren-free syntax a lot.

>but, even better, how about
>
>  use constant EARLIEST_VALID_TIMESTAMP =>
MyProject::CoreConstants::EarliestValidTimestampAsNumber();

What a beautiful solution.  That helps tremendously.


>BTW, where does 'timegm' come from?

That useful little gem comes from Time::Local on CPAN.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to