I have a $heap->{HASH}->{} in the first package. I need it in the second one, but how to merge it ?

Just to send it to the second and then postback ?

package POE::Component::My::One

$heap->{HASH}->{one}=1;
$heap->{HASH}->{two}=2;

POE::Component::My::Two->spawn(
#don`t know to to sent it, but something like...
HASH => [$heap->{HASH}],
POSTBACK => $_[SESSION]->postback("done");
);

sub done {
 my [EMAIL PROTECTED];
 my $hash=$response->[0];
 for( keys $hash)
 {
  if(!$heap->{HASH}{$_})
  {
   $heap->{HASH}{$_}=$hash{$_};
  }
 }
}

POE::Component::My::Two;

sub spawn {
 $heap->{HASH}->{three}=3;
 $_[HEAP]->{POSTBACK}(\%{$heap->{HASH}});
}

1. Work with HASH in the package ::ONE
2. POST it to the TWO
3. POSTBACK from TWO
4. SAVE new variables in ONE

Please help.
thank you very much !!
---
Professional hosting for everyone - http://www.host.ru

Reply via email to