It's not really the just the source he's showing though, it's the
source of the subexpressions leading to the failure of the last
expression.

Working on the string level is even more confusing in this case,
it's beyond just parsing perl without losing sanity, you must also
reconstruct it.

I have no idea if this rewriting of functions is at all possible,
but here's an idea:

I would think the best way (in theory) to go about this is to
deconstruct the last expression of the closure, and reconstruct it
such that the values of every subexpression is cached in a variable,
and the variable replaces the subexpression. The variables live
outside the new closure, which closes over them. The subexpressions
are also deparsed individually.

Then on failure the subexpression variable hash thingy could just be
dumped.

Thoughts?

-- 
  Yuval Kogman <[EMAIL PROTECTED]>
http://nothingmuch.woobling.org  0xEBD27418

Reply via email to