in reply to Re: Conditional use of 'use'
in thread Conditional use of 'use'

Camel 3, p. 822 (which I had already consulted), says: BEGIN { require MODULE; import MODULE LIST; } What about the import? Needed? Not? The modules are pure OO. And no @EXPORT (if that is relevant).

Replies are listed 'Best First'.
Re: Re: Re: Conditional use of 'use'
by chromatic (Archbishop) on Jun 12, 2001 at 20:05 UTC
    You've asked the right question. If you only ever use the OO interface and if you don't export anything from the modules, you don't need to import anything explicitly.
(tye)Re2: Conditional use of 'use'
by tye (Sage) on Jun 12, 2001 at 22:41 UTC

    Then you can just do:

    if ($version == 2) { require LayerB2; } else { require LayerB; }

            - tye (but my friends call me "Tye")