On 7/1/05, Michael G Schwern <[EMAIL PROTECTED]> wrote:
> On Thu, Jun 30, 2005 at 09:44:06AM +0200, demerphq wrote:
> > > Out of curiousity, if Data::Dumper::Streamer can handle
> > > closures why not fix B::Deparse?
> >
> > I'm not really sure what you mean by "fix" B::Deparse. B::Deparse does
> > exactly what it says it does: it deparses code.  We can't consider it
> > broken for not doing something it doesn't claim to do in the first
> > place.
> 
> B::Deparse has a coderef2text() method which can deparse individual routines.
> Many have lamented that it does not take closure context into account.
> This means that the output from coderef2text() cannot be eval'd into a
> routine with the same functionality.  It causes problems in serialization.

Well then they should use a serialization tool like Data::Dump::Streamer.

:-)

Seriously tho, this problem requires an analysis phase followed by a
dump phase. Afaik DDS is the only dumper that does this. Merging a
multi-pass dumper into the B::Deparse code doesnt seem the right way
to do it. IMO, coderef2text() is fine, let people write dumpers that
use it. They can look at my code to see how its done. I suppose a bit
of my code could be moved over to make writing dumpers easier, but Id
be surprised if it was much.

Yves

-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

Reply via email to