Filter::ExtractSource

Download

Installation

Unzip and untar the archive, cd to the distribution directory and enter the following commands:

perl Makefile.PL
make
make test
make install

Usage

perl -c -MFilter::ExtractSource input.pl >output.pl

Where input.pl contains Perl code which uses source filters, output.pl will contain the source code after filtering (i.e. the code which is passed to the Perl parser).

Bugs / Issues

Any BEGIN blocks, CHECK blocks or use statements will be executed at compile-time (i.e. the code will be executed even when the '-c' switch is used). Therefore any data sent to the STDOUT stream by these blocks will be output before the filtered source code, so in the example above the output.pl file may need to be edited. A future release of Filter::ExtractSource will support writing the modified source code to a file instead of STDOUT to fix this problem.

Copyright and Licence

Copyright © Jon Allen (JJ) 2004

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.