Slash Boxes
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

use Perl Log In

Log In

[ Create a new account ]

chromatic (983)

  (email not shown publicly)

Blog Information [] Profile for chr0matic []

Journal of chromatic (983)

Thursday May 02, 2002
11:49 PM

Today's Hacking

[ #4632 ]

With Test::MockObject on the CPAN, I've released a new version of Text::WikiFormat. The main enhancement is a custom import(), spurred on by a request from Tony Bowden. That's one five week-old project finally off my plate.

At work, I've added a nifty new navigation feature to the product catalogs. In the process, I merged the administrative and end-user lists as far as was reasonable. (More was possible, but there's diminishing returns -- the further I go, the more I'll have to revise.) I'm still in negative lines of code for the week, though.

Seeing that Simon has released new versions of B::Generate and B::Utils, and that multiple people have asked about B::ToXML and B::FromXML (see prior journal entries), it's time to devote more attention to the problem. I can serialize bytecode to XML with no problem. I'm pretty sure it captures the relevant information (at least, everything available through I'm pretty sure it's generating the correct opcodes, though some of the optimizations may be getting in my way. (When a LISTOP has been flattened into a NOP, but still has children, I get confused.) I seem to be able to attach the ops in the right order and can splice them into a fresh anonymous sub, but they confuse both the interpreter and B::Deparse... So I get infinite loops when running the spliced sub and strange output from deparsing it.

There's something I'm missing, and it may take a really scary guru to find it.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • ... B::(To|From)XML ? I'm not a "scary" guru, but it may be fun to look at. (Are you testing those with bleadperl ? O and B have been improved since 5.6.1.)
    • I wrote B::XML last year at OSCon as a futile attempt to use XSLT for processing abstract syntax trees to convert between languages.
    • Hmm, I had the same idea as Simon, several months later. My version of B::ToXML [] and [] are both available from my site.

      I've been using bleadperl to test these, and I think I patched B::Generate to add next() to B::COP objects, but I'm not completely certain at the moment.