in reply to Re: Re:(5): Perl Internals - references and symbol table
in thread Perl Internals - references and symbol table

What I did in this case was use a hash so there could be multiple instances. The hash key was the stringified args and a join of caller. It almost always works but there are several potential problems.

If this could be solved generically, then I think you'd be able to implement basic "coroutines" as I understand them. You'd still have to wrap up the start executions in if's or something but it would be a start.

-Lee

"To be civilized is to deny one's nature."
  • Comment on Re: Re: Re:(5): Perl Internals - references and symbol table

Replies are listed 'Best First'.
Re: Re: Re: Re:(5): Perl Internals - references and symbol table
by BrowserUk (Patriarch) on Nov 20, 2002 at 05:56 UTC

    I did play around with some stuff that generated iterator subs on the fly here RFC and debugging tips. That allowed you to use multiple independant iterators. When the handle to the iterator goes out of scope it gets thrown away, bit I think that is getting oo-ish which isn't what your looking for.

    Oh well. I guess I came to the party late and should have read back over the thread before commenting.


    Okay you lot, get your wings on the left, halos on the right. It's one size fits all, and "No!", you can't have a different color.
    Pick up your cloud down the end and "Yes" if you get allocated a grey one they are a bit damp under foot, but someone has to get them.
    Get used to the wings fast cos its an 8 hour day...unless the Govenor calls for a cyclone or hurricane, in which case 16 hour shifts are mandatory.
    Just be grateful that you arrived just as the tornado season finished. Them buggers are real work.