[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

Re: [PATCH] Data::Dumper.pm



Larry Wall wrote:
>
> A better approach might be to make Data::Dumper instruct Perl to
> save a copy of the original code structure.
> 

Maybe I'm missing something huge here, but isn't B::Deparse is just
about the closest thing we have to this (reconstructing the source from
what is left of the source after compile -- the optree).

Perhaps being able to do something funky with inline opcodes could do a
better job? ie:

	use Inline;
	sub test {
	   inline q(
		...
           );
	}

Then instead of having to reconstruct the source, you could simply
inline the opcodes, and be able to deconstruct/reconstruct an anonymous
sub that way.

Of course that might open a can of worms with people mad enough to
consider using the opcodes instead of pretty perl in the first place...

Regards,
James.

-- 
James A. Duncan
Technical Programmer, ebookers.com Plc.
ICQ:     21304370
Email:   james@ebookers.com
Phone:  +44 (0) 207 757 2672 
Mobile: +44 (0) 789 990 5763


References to:
Larry Wall <larry@wall.org>

[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]