in reply to Re: Stripping Comments from Source
in thread Stripping Comments from Source

OK ....I have to admit that I have no clue how "PDK compilations" look like...

IMHO processing the perlsources before piping them into another make/compilation process should be safe!

HTH!

Cheers Rolf

Replies are listed 'Best First'.
Re^3: Stripping Comments from Source
by Kob (Novice) on May 12, 2010 at 14:58 UTC
    Your comments were most helpful. Thank you.

      Have a look at PPI::Document, too:

      #!/usr/bin/perl use strict; use warnings; # Straight from the documention use PPI; # Load a document from a file my $Document = PPI::Document->new('My/Module.pm'); # Strip out comments $Document->prune('PPI::Token::Comment'); # Strip out Pod $Document->prune('PPI::Token::Pod'); # Save the file $Document->save('My/Module.pm.stripped');

      Hth, Thomas

      Udate: Added code to strip Pod

        Following your tip, I installed PPI::Document via PPM to see if it would improve on the stripping relative to perltidy. However, this critical step did not work:

        $Document = PPI::Document->new('Module.pm');

        I guess there is some PPI::Document package I need to get. I'll continue this later.

        Thanks.