in reply to Re: Re: Proper syntax for using a method as a call back routine?
in thread Proper syntax for using a method as a call back routine?

That isn't going to work.

I assumed that the parser would be called on to do its thing within the scope of the current method. If that's not the case, consider stashing $self into a package variable.

  • Comment on Re: Re: Re: Proper syntax for using a method as a call back routine?
  • Download Code

Replies are listed 'Best First'.
Re: Re: Re: Re: Proper syntax for using a method as a call back routine?
by BrowserUk (Patriarch) on Jul 08, 2003 at 03:35 UTC

    I assumed that the parser would be called on to do its thing within the scope of the current method.

    In which case, it would work, and I'm talking out my lower lumbar region again :)

    Needless to say, I assumed that it wouldn't be called until later, which was the case when I 'discovered' this problem, and after falling foul of trying to push and pop instance handles for multiple instances, arrived at the work-around of passing a ref to a closure around a call to the method.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller