in reply to Re: Using Win32::SerialPort in a module
in thread Using Win32::SerialPort in a module
Hi. Thanks people. I feel I am compliant with requests with the following in the .pm module and .pl program.
--------------------------------- Within the .pm module --------------------- package Serial; require Exporter; Exporter->import('import'); #Now declare what we permit to be visible within this module. our @EXPORT = qw( &Serial_Init &Serial_TrxRcv &Serial_Close); --------------------------------- Within the test .pl program --------------------------- use lib '.'; # The Serial.pm is in the current folder use Serial; # use a "1 off type of macro expansion" of the Seria +l module Serial_Init(); # Initialise the interface ---------------------------------
I find the line in .pm of "Exporter->import('import');" to be un-intuitive. Possibly it relates to the importing on the .pl program ?
I need to check out module CLI (ta)
Regards JC.....
|
|---|