in reply to Re: Pass a hash array to module
in thread Pass a hash array to module
this is working... but i don't know how.. constructor how works ???my %data; my $myObj = new test::mod1(); %data = $myObj->prepare(%data); ------------------------- package test::mod1; sub new { my ($class_name, $dql) = @_; my $internalData = {dql => $dql}; bless($internalData, $class_name); return $internalData; } sub prepare { my ($internalData, %record) = @_; return %record; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Pass a hash array to module
by moritz (Cardinal) on Jun 01, 2010 at 09:28 UTC |