1Pod::Simple::Debug(3) User Contributed Perl DocumentationPod::Simple::Debug(3)
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://www.sysadminmag.com/tpj/issues/vol5_5/>
67
69       Copyright (c) 2002 Sean M. Burke.  All rights reserved.
70
71       This library is free software; you can redistribute it and/or modify it
72       under the same terms as Perl itself.
73
74       This program is distributed in the hope that it will be useful, but
75       without any warranty; without even the implied warranty of mer‐
76       chantability or fitness for a particular purpose.
77

AUTHOR

79       Sean M. Burke "sburke@cpan.org"
80
81
82
83perl v5.8.8                       2003-11-02             Pod::Simple::Debug(3)
Impressum