Neil,
A use statement is processed at compile time while the if statement is
processed at run time. Therefore, you cannot conditionalize a use with an
if. In your example, both Trapper and Logger are being loaded all the
time.
If you want to conditionalize the loading of modules, then either use
require, which is processed at run time, or put the if/use statements in a
BEGIN{} block, which will be processed at compile time BEFORE the rest of
the program is compiled.
Notice, however, that require does not import modules variables like use
does, but you are fully qualifying the module names so it shouldn't make a
different to you.
Merrill
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs