Filter::PPI - PPI based source filtering
package MyFilter; use Filter::PPI; sub ppi_filter { my ($class,$doc) = @_; # Do funny things to $doc here return $doc; } package MyModule; use MyFilter; # This will get filtered
This module lets you write perl source filters using PPI to process the source. Compared to other modules used for writing source filters, it is quite simple. You only need to have one method in your class, called ppi_filter. This gets passed the class name, a PPI::Document object, and any arguments given to import. The method is expected to return a PPI::Document but not neccesarily the same one. The document returned will be what's used by perl to compile the program.
Most software has bugs. This module probably isn't an exception. If you find a bug please either email me, or add the bug to cpan-RT.
Anders Nor Berle <berle@cpan.org>
Copyright 2008 by Anders Nor Berle.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Filter::PPI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Filter::PPI
CPAN shell
perl -MCPAN -e shell install Filter::PPI
For more information on module installation, please visit the detailed CPAN module installation guide.