I've been searching and trying to find out how to return a perl module pointer that allows me to do the following:
above is what I want to do.# data is a pointer $data = ABC::readdatafile($filename); print "$data"; # output of print is: ABC::Data=SCALAR(0xc7918) # my goal is to be able to do use this and features like: $high = $data->get_high($signal); $low = $data->get_low($signal);
When I read the data file (it's a large binary file, with many different data types, stored inside a module), I'm only returning a SCALAR element, with no module information.
#(inside the module) my $ref = \@data; return($ref);
ie. it's returning
SCALAR(0xc7918)
and not
ABC::Data=SCALAR(0xc7918)
I have another module I am using (external module, source code not available) which uses this method, and I would like to follow it.
I would appreciate any suggestions!! Thank you!
In reply to Returning module pointer by yazzle
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |