1Stripper(3) User Contributed Perl Documentation Stripper(3)
2
3
4
6 Pod::Stripper - strip all pod, and output what's left
7
9 $>perl Stripper.pm
10
11 or
12
13 #!/usr/bin/perl -w
14
15 use strict;
16 use Pod::Stripper;
17
18 my $Stripper = new Pod::Stripper();
19
20 $Stripper->parse_from_filehandle(\*STDIN) unless (@ARGV);
21
22 for my $ARGV (@ARGV) {
23 $Stripper->parse_from_file($ARGV);
24 }
25
27 This be "Pod::Stripper", a subclass of "Pod::Parser". It parses perl
28 files, stripping out the pod, and dumping the rest (presumably code) to
29 wherever you point it to (like you do with "Pod::Parser").
30
31 You could probably subclass it, but I don't see why.
32
33 MOTIVATION
34 I basically re-wrote "Pod::Stripper" on two separate occasions, and I
35 know at least 2 other people who'd use it, and thought It'd make a nice
36 addition.
37
38 "perl -MPod::Stripper -e"Pod::Stripper->new()->parse_from_file(shift)""
39 " Stripper.pm"
40
41 EXPORTS
42 None. This one be object oriented (at least I'm under the impression
43 that it is).
44
45 SEE ALSO
46 "Pod::Parser" and Pod::Parser, esp. the "input_*" and "output_*"
47 methods
48
50 This module will correctly strip out get rid of hidden pod, and
51 preserve hiddencode, but like all pod parsers except "perl", it will be
52 fooled by pod in heredocs (or things like that).
53
54 see perlpod and read Stripper.pm for more information.
55
57 D.H. aka crazyinsomniac|at|yahoo.com.
58
60 Copyright (c) 2002 by D.H. aka crazyinsomniac|at|yahoo.com. All rights
61 reserved.
62
63 This module is free software; you can redistribute it and/or modify it
64 under the same terms as Perl itself.
65
67 props to all the perlmonks at perlmonks.org, and especiall danger and
68 the ones who showed interest in Pod::Stripper
69
70 http://perlmonks.org/index.pl?node=Pod::Stripper
71
74 ==head2 HEY THIS POD TOO (REALLy, == is valid, although some parsers
75 might disagree)
76
77 podchecker will not complain
78
79 ABTEST print "THIS IS HIDDEN POD";
80 CUT
81 had to make sure
82
83 I AM INSIDE A HEREDOC
84 WHERE ARE YOU?
85
86 I AM HIDDEN POD INSIDE A HEREDOC warn "really, I am"
87 BOO
88 but hey, if the pod inside a heredoc gets eaten by a pod parser (as it
89 shoulD) I see no problem here
90
91 WELL IF THIS WASN'T AFTER "__END__" "this would still be hidden pod";
92 THIS REALLY IS AN UGLY HACK
93 yes, it is
94
95
96
97perl v5.28.0 2002-02-28 Stripper(3)