"Laura" <[EMAIL PROTECTED]> writes:
>
> Why doesn`t variables of HEAP changed?
> There is a little chunk of program(2 subs):
>
> sub one {
>
> $_[HEAP]->{VARIABLE}=0;
> for(1..4)
> {
> $_[KERNEL]->yield("two");
> }
> print "VARIABLE: ",$_[HEAP]->{VARIABLE};
>
> }
>
> sub two {
> $_[HEAP]->{VARIABLE}++;
> }
>
> It will print "VARIABLE: 0", but why? I`ve updated it in
> 'two', it must be 1(cause of ++).
In one() you schedule an event to run four times. When you return from
one() you give control back to POE. POE can then process the queue and
dispatch the four 'two'-events.
events are not object methods..