in reply to Re: PadWalker and Safe - getting the lexicals
in thread PadWalker and Safe - getting the lexicals

Hi (all and robin),
Well, we had a good "fight", but now we are sure that in order to get the lexical information we do need to get into perlguts.
The question now is - how to do it ?
From where do we start ?
Unfortunately we don't have the time to play around, and we need to understand fast whether it will take us 2 days or 2 weeks. Too many deadlines...

- Do we need to get into Perl code, or do we need only PadWalker code ?
- Where do we get PadWalker code ?
- Does a standard RH 7.3 installation is enough, or should we get some other development environment ?

TIA,
shushu
  • Comment on Re: Re: PadWalker and Safe - getting the lexicals

Replies are listed 'Best First'.
Re^3: PadWalker and Safe - getting the lexicals
by diotalevi (Canon) on Oct 13, 2002 at 15:46 UTC

    I haven't been motivated enough to see what the inside of a Safe::Hole->reval looks like but now that you've decided to go perlguts your first thing to do is to look at the B module. In my sig you'll notice an example of a script getting the current CV via B::svref_2object(sub {} )->OUTSIDE. I would initially recommend you read Gisle Aas' Illustrated PerlGuts, then Simon Cozens' internals tutorial and if that isn't enough descend into perlguts and perlhack. The key here is you're just walking structures. You aren't going to have to alter stuff so the documentation is to guide you in using B to walk all over.

    __SIG__ printf "You are here %08x\n", unpack "L!", unpack "P4", pack "L!", B:: +svref_2object(sub{})->OUTSIDE