PPI::Transform support
Status: Alpha
Brought to you by:
grantm
Recent versions of PPI have seen the addition of a
document transformation API.
This lets you write classes that transform Perl
documents, such as Perl::Squish, that will work in any
environment that implements support for Perl::Transform.
It would be quite cool if Sprog could get a
PPI::Document connector, and then had support added for
PPI::Transform classes.
Logged In: YES
user_id=242694
I don't think a separate connector is necessary. The
existing framework could support transformations in a number
of ways, eg:
Use the 'pipe' connector and pass Perl code between the
gears. PPI transformation gears could use Perl->PPI and
PPI->Perl mixin classes . It might not be the most
efficient approach but that's not necessarily a primary goal.
Alternatively, the 'record' connector could be used. This
simply
passes each message as a hashref. The PPI transformation
gears could adopt a convention of using the 'PPI' hash key
to pass the PPI::Document object.