[EMAIL PROTECTED] (Geoffrey Young) wrote:
>> -----Original Message-----
>> From: Geoffrey Young [mailto:[EMAIL PROTECTED]]
>> Sent: Friday, May 25, 2001 8:55 AM
>> To: 'Doug MacEachern'; Stas Bekman
>> Cc: modperl-2.0 dev-list
>> Subject: RE: Apache2:: namespace, prerequisite checking and 
>> CPAN listing
>
>oh, I forgot to mention that I know we can use stuff like $mod_perl::VERSION
>and $PERL_VERSION, but my (real) point was that
>
>use 5.6.0;
>
>happens at compile time, and it would be nice to have a back-checker
>that happened at compile time as well instead of having to wait until
>run time (a friend said the term I was looking for was "orthogonal
>behavior" :)

It should be sufficient to do:

  use mod_perl;
  BEGIN { die "horribly" if $mod_perl::VERSION >= 2 }

It's very handy to remember that 'use' is just 'require' and 'import' in
a 'BEGIN' block.

That said, it seems like it should be easy to implement the construct
you originally wanted, and it would be generally useful.


  -------------------                            -------------------
  Ken Williams                             Last Bastion of Euclidity
  [EMAIL PROTECTED]                            The Math Forum

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

Reply via email to