NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
B::Generate (Score:1)
I'm also having trouble doing this. The best reference I've found so far is Simon's 'use Python' paper in last year's TPC proceedings. He has an example of creating a new anonymous sub, calling svref_2object() on it, and manipulating its START and ROOT ops.
I can get pretty close, but never quite avoid the segfaults. It probably doesn't help that I'm trying to pass the rewritten subref to B::Deparse, either.
Re:B::Generate (Score:1)
Thanks again!
Re:B::Generate (Score:1)
I'm glad to help. Is there a chance you'd be willing to share the code? I'm curious to see another example. (I don't have unfolded constants yet, and that would be handy.)
Reply to This
Parent
Re:B::Generate (Score:1)
Sorry about the delay in responding. I'd be happy to post my code, but it was a bit of a hack, and I've just recieved an email from Simon describing how to do it the right way [perl.org] (for some definition of right).