in reply to Pod::Stripper
I made a stripper.pl script with#!/usr/bin/perl -w # testpod.pl use strict; =head1 test to be stripped =cut print "everything fine\n"; =head1 another test to be stripped =cut print "end\n";
The Stripper will output#!/usr/bin/perl -w use strict; use Stripper; my $Stripper = new Pod::Stripper(); $Stripper->parse_from_filehandle(\*STDIN) unless (@ARGV); for my $ARGV (@ARGV) { $Stripper->parse_from_file($ARGV); }
(missing one line of code)#!/usr/bin/perl -w use strict; print "end\n";
and the output contains the print "everything fine\n"; line.#!/usr/bin/perl -w use strict; my $inside_pod = 0; while (<>){ if ($inside_pod) { $inside_pod = ! /^=cut/; next; } else { $inside_pod = /^=\w/; } print unless $inside_pod; }
I know that POD tags should be isolated (i.e separated by "\n" before and after) but what if they don't? (As I found in some modules)my $var =' =test ';
_ _ _ _ (_|| | |(_|>< _|
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Pod::Stripper
by crazyinsomniac (Prior) on Feb 03, 2002 at 11:44 UTC | |
|
(crazyinsomniac: fixed it) Re^2: Pod::Stripper
by crazyinsomniac (Prior) on Feb 12, 2002 at 12:40 UTC |