module-authors:

I submitted a patch for Filter::Cpp about three months ago to Reini Urban and Paul Marquess, but never heard back from either of them.


I seem to recall that I later tested the changes on macOS and FreeBSD, and they failed.


Suggestions?


David



-------- Forwarded Message --------
Subject: Filter-1.60
Date: Wed, 20 Oct 2021 21:47:14 -0700
From: David Christensen <dpchr...@holgerdanske.com>
To: rur...@cpan.org
CC: p...@cpan.org

Reini:

Thank you for your work on Filter.  :-)


Attached please find a tarball (Filter-1.60-dpchrist-20211016.tar.gz) with some changes I made to Filter::cpp to help it work better with Perl code:

1. Added a pre-filter to escape octothorps ('#') not involved with C preprocessor control-lines.

2.  Added a post-filter to unescape octothorps.

3. Added an options hash %opt with default values that can be overridden via Filter::cpp import() arguments.

4.  Reworked the cpp and sh invocations to use %opt.

5. Added a debugging function, _d(), that is controlled by the DEBUG_FILTER__CPP environment variable and writes debug messages to a file named after the running script: "$0.debug".

6. Reworked cpp.t to dump variables on test failure, and to keep generated files on test failure or when debugging is enabled.

7.  Added generated files to Makefile.PL 'clean' target.


At this point, all of the test suite except t/z_manifest.t (skipped) passes on Debian GNU/Linux 9, and Filter::cpp works correctly with a simple example module (MyLib-0.01-dpchrist-20211016.tar.gz, attached).


I would like to contribute my changes to Filter, if you find them agreeable. I am willing to learn and help do the work, but am unfamiliar with the process (CPAN, Git, and/or GitHub).


Please advise.


David

Attachment: Filter-1.60-dpchrist-20211016.tar.gz
Description: application/gzip

Attachment: MyLib-0.01-dpchrist-20211016.tar.gz
Description: application/gzip

Reply via email to