in reply to conditional enable use bytes for a whole module at compiletime?

Since you simply want to conditionally include a lexically scoped module at compile-time it sounds like the if module will do the job. If adapted to your example code it looks to work just fine:
BEGIN { $Y::VERSION = 0.1 } { package X; use if ( $Y::VERSION < 1 ), "bytes"; sub l { return length shift } } no bytes; print X::l( chr 3456 ); __output__ 3
HTH

_________
broquaint

  • Comment on Re: conditional enable use bytes for a whole module at compiletime?
  • Download Code

Replies are listed 'Best First'.
Re^2: conditional enable use bytes for a whole module at compiletime?
by borisz (Canon) on Nov 19, 2004 at 16:03 UTC
    Thats what I searched for!. Thanks.
    Boris