1Pod::Simple::Debug(3pm)Perl Programmers Reference GuidePod::Simple::Debug(3pm)
2
3
4

NAME

6       Pod::Simple::Debug -- put Pod::Simple into trace/debug mode
7

SYNOPSIS

9        use Pod::Simple::Debug (5);  # or some integer
10
11       Or:
12
13        my $debuglevel;
14        use Pod::Simple::Debug (\$debuglevel, 0);
15        ...some stuff that uses Pod::Simple to do stuff, but which
16         you don't want debug output from...
17
18        $debug_level = 4;
19        ...some stuff that uses Pod::Simple to do stuff, but which
20         you DO want debug output from...
21
22        $debug_level = 0;
23

DESCRIPTION

25       This is an internal module for controlling the debug level (a.k.a.
26       trace level) of Pod::Simple.  This is of interest only to Pod::Simple
27       developers.
28

CAVEATS

30       Note that you should load this module before loading Pod::Simple (or
31       any Pod::Simple-based class).  If you try loading Pod::Simple::Debug
32       after &Pod::Simple::DEBUG is already defined, Pod::Simple::Debug will
33       throw a fatal error to the effect that "it's s too late to call
34       Pod::Simple::Debug".
35
36       Note that the "use Pod::Simple::Debug (\$x, somenum)" mode will make
37       Pod::Simple (et al) run rather slower, since &Pod::Simple::DEBUG won't
38       be a constant sub anymore, and so Pod::Simple (et al) won't compile
39       with constant-folding.
40

GUTS

42       Doing this:
43
44         use Pod::Simple::Debug (5);  # or some integer
45
46       is basically equivalent to:
47
48         BEGIN { sub Pod::Simple::DEBUG () {5} }  # or some integer
49         use Pod::Simple ();
50
51       And this:
52
53         use Pod::Simple::Debug (\$debug_level,0);  # or some integer
54
55       is basically equivalent to this:
56
57         my $debug_level;
58         BEGIN { $debug_level = 0 }
59         BEGIN { sub Pod::Simple::DEBUG () { $debug_level }
60         use Pod::Simple ();
61

SEE ALSO

63       Pod::Simple
64
65       The article "Constants in Perl", in The Perl Journal issue 21.  See
66       <http://interglacial.com/tpj/21/>
67

SUPPORT

69       Questions or discussion about POD and Pod::Simple should be sent to the
70       pod-people@perl.org mail list. Send an empty email to
71       pod-people-subscribe@perl.org to subscribe.
72
73       This module is managed in an open GitHub repository,
74       http://github.com/theory/pod-simple/ <http://github.com/theory/pod-
75       simple/>. Feel free to fork and contribute, or to clone
76       git://github.com/theory/pod-simple.git <git://github.com/theory/pod-
77       simple.git> and send patches!
78
79       Patches against Pod::Simple are welcome. Please send bug reports to
80       <bug-pod-simple@rt.cpan.org>.
81
83       Copyright (c) 2002 Sean M. Burke.
84
85       This library is free software; you can redistribute it and/or modify it
86       under the same terms as Perl itself.
87
88       This program is distributed in the hope that it will be useful, but
89       without any warranty; without even the implied warranty of
90       merchantability or fitness for a particular purpose.
91

AUTHOR

93       Pod::Simple was created by Sean M. Burke <sburke@cpan.org>.  But don't
94       bother him, he's retired.
95
96       Pod::Simple is maintained by:
97
98       ·   Allison Randal "allison@perl.org"
99
100       ·   Hans Dieter Pearcey "hdp@cpan.org"
101
102       ·   David E. Wheeler "dwheeler@cpan.org"
103
104
105
106perl v5.12.4                      2011-06-07           Pod::Simple::Debug(3pm)
Impressum