yazzle has asked for the wisdom of the Perl Monks concerning the following question:
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!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Returning module pointer
by dragonchild (Archbishop) on May 04, 2005 at 18:27 UTC | |
by yazzle (Initiate) on May 04, 2005 at 18:39 UTC | |
|
Re: Returning module pointer
by gellyfish (Monsignor) on May 05, 2005 at 09:48 UTC |