Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Handy Algorithm For Using B::Generate

by stvn (Monsignor)
on Jan 25, 2004 at 23:54 UTC ( #324032=note: print w/ replies, xml ) Need Help??


in reply to Handy Algorithm For Using B::Generate
in thread The B:: Modules

chromatic,

Thanks, I started to doing this earlier today, and then just got stuck on trying to get plain old B to print out the innards of my subroutines (building off Simon's tutorial's examples). I think I read about half the code in B::Deparse before I managed to hit something similar to the infinite loop you speak of in Step 8.

I also kept encountering a package B::SPECIAL, for which I saw no listing in B documentation for, but did find in the source that is was just a plain old B::OBJECT. Anyone know what this refers too?

-stvn


Comment on Re: Handy Algorithm For Using B::Generate
Re: Re: Handy Algorithm For Using B::Generate
by diotalevi (Canon) on Jan 26, 2004 at 01:34 UTC
    B::SPECIAL objects are instances of pointers to the perl global invariants, PL_sv_undef, PL_sv_yes, and PL_sv_no. You were seeing one of those.

      You guys wouldn't happen to know how to fetch the scalar value associated with a B::GV object too would you?

      Looking at the results from Devel::Peek::Dump($a), it would seem to me that the GV -> GP -> SV would be the pathway to the SV (and its eventual value), but there is no GP method for the B::GV object. I am sure I am just missing something very obvious here, but I can't seem to resolve this. All I can seem to get when I call B::GV->SV is a B::NULL object, which makes no sense. Am I just running into the optimizer here?

      Okay, going to bed now with visions of op-code trees dancing in my head. Should make for some interesting dreams.

      -stvn

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://324032]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2014-12-21 07:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (104 votes), past polls