There. A conditional "use".BEGIN { if ($some_condition) { require Win32::SerialPort; import Win32::SerialPort qw(:ALL); } else { require Device::SerialPort; import Device::SerialPort qw(:ALL); } }
P.S. I just typed this earlier today on comp.lang.perl.tk. I wonder if this is the same person. {grin}
-- Randal L. Schwartz, Perl hacker
In reply to RE: Re: Stupid OO question
by merlyn
in thread Stupid OO question
by lindex
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |