File Coverage

blib/lib/Debug/ShowStuff.pm
Criterion Covered Total %
statement 81 965 8.3
branch 0 386 0.0
condition 0 84 0.0
subroutine 27 121 22.3
pod 35 60 58.3
total 143 1616 8.8


\n" ', ', ', ', "\n"; ', ', \n";
line stmt bran cond sub pod time code
1             package Debug::ShowStuff;
2 1     1   1003 use strict;
  1         2  
  1         36  
3 1     1   6 use Carp;
  1         2  
  1         104  
4 1     1   911 use Tie::IxHash;
  1         5849  
  1         32  
5 1     1   1093 use String::Util ':all';
  1         6121  
  1         328  
6             require 5.005; # require at least Perl version 5.005
7              
8             # version
9             our $VERSION = '1.16';
10              
11              
12             # allow for forced context
13             # This is a change to how Debug::ShowStuff used to work. It used to be that
14             # the output of a function (e.g. println) was returned as a scalar if the
15             # function call was made in an array context. This got confusing when the
16             # call was the last call in a function. I'm changing it so that, by default,
17             # the function always outputs to the standard file handle (usually STDOUT).
18             our $always_void = 1;
19              
20             # allow for forced web/plain
21 1     1   9 use vars qw[ $forceweb ];
  1         2  
  1         78  
22              
23             # global output file handle
24             # default $out to STDOUT
25             our $out;
26             $out = *STDOUT;
27              
28             # default $out to STDOUT
29 1     1   4 use vars qw[ $active ];
  1         2  
  1         67  
30             $active = 1;
31              
32             # INDENT: how far to indent a line
33             our $indent_level = 0;
34             my $indent_tab = ' ';
35              
36             # constants
37 1     1   6 use constant STDTABLE => qq|

\n

\n|;
  1         2  
  1         92  
38              
39              
40             #---------------------------------------------------------------------
41             # export
42             #
43 1     1   4 use vars qw[@EXPORT_OK %EXPORT_TAGS @ISA];
  1         1  
  1         42  
44 1     1   4 use Exporter;
  1         1  
  1         647  
45             push @ISA, 'Exporter';
46              
47             @EXPORT_OK = qw[
48             showhash showhashhtml showhashplain
49             showarray showarr
50             showarraydiv showarrdiv
51             showcgi
52             showscalar showsca
53             showref
54             showstderr
55             setoutput
56             pressenter
57             inweb
58             httpheader
59             httpheaders
60             println
61             printnorm
62             printhr
63             preln
64             dieln
65             devexit
66             diearr
67             fixundef
68             diearr
69             findininc
70             confirm
71             output_to_file
72             define_show
73             showtainted
74             showstuff
75             indent
76             timer
77             backtrace
78             dietrace
79             autoshow
80            
81             forceenv
82             forcetext
83             forceweb
84             forcenone
85            
86             showisa
87            
88             showsth
89             showsql
90             explainsql
91             ];
92              
93             %EXPORT_TAGS = ('all' => [@EXPORT_OK]);
94             #
95             # export
96             #---------------------------------------------------------------------
97              
98              
99             #------------------------------------------------------------------------------
100             # opening POD
101             #
102              
103             =head1 NAME
104              
105             Debug::ShowStuff - A collection of handy debugging routines for displaying
106             the values of variables with a minimum of coding.
107              
108             =head1 SYNOPSIS
109              
110             Here's a sampling of a few of my favorite functions in this module.
111              
112             use Debug::ShowStuff ':all';
113            
114             # display values of a hash or hash reference
115             showhash %hash;
116             showhash $hashref;
117            
118             # display values of an array or array reference
119             showarr @arr;
120             showarr $arrref;
121            
122             # show all the params received through CGI
123             showcgi();
124            
125             # A particularly fancy utility: display STDERR at top of web page
126             my $warnings = showstderr;
127              
128              
129             =head1 INSTALLATION
130              
131             C can be installed with the usual routine:
132              
133             perl Makefile.PL
134             make
135             make test
136             make install
137              
138             =head1 DESCRIPTION
139              
140             C grew dynamically from my needs in debugging code. I found
141             myself doing the same tasks over and over... displaying the keys and
142             values in a hash, displaying the elements in an array, displaying the output
143             of STDERR in a web page, etc. C began as two or three of my
144             favorite routines and grew as I added to that collection. Finally I decided
145             to publish these tools in the hope that other Perl programmers will find
146             them useful.
147              
148             =head2 Not for production work
149              
150             C is for debugging, not for production work. It does not
151             always output the actual value of something, but rather information B
152             the value. For example, the following code outputs the actual value in the
153             first line, but a note about the value in the second.
154              
155             println 'my value';
156             println undef;
157              
158             which outputs
159              
160             my value
161             [undef]
162              
163             I would discourage you from using C in production code.
164             C is only for quick-n-dirty displays of variable values in
165             order to debug your code.
166              
167             =head2 Text and web modes
168              
169             The functions in C are designed to output either in plain
170             text mode (like if you're running the script from a command prompt), or in web
171             mode (like from a CGI). If the script appears to be running in a CGI or other
172             web mode (see the C function) then values are output using HTML, with
173             special HTML characters escaped for proper display. Othewise the values are
174             output as they are.
175              
176             Generally you won't need to bother telling C if you're in
177             text or web mode... it figures it out on its own.
178              
179             =head2 Dynamic output/return: different than previous versions
180              
181             NOTE: The dynamic behavior of "show" functions has changed since earlier
182             versions of Debug::ShowStuff. "show" functions now always outputs to STDOUT
183             or STDERR unless $Debug::ShowStuff::always_void is set to false. By default
184             $always_void is true.
185              
186             If $always_void is false, then the following applies:
187              
188             The functions that start with "show" dynamically either output to STDOUT or
189             STDERR or return a string, depending on the context in which the
190             functions are called. For example, if you call showhash in a void context:
191              
192             showhash %myhash;
193              
194             then the contents of %myhash are output to STDOUT. On the other hand, if the
195             function is called in scalar context:
196              
197             my $var = showhash(%myhash);
198              
199             then the same string that would have been output to STDOUT is instead
200             returned and stored in $var.
201              
202             By default, output is sent to STDOUT, not STDERR. You can change the
203             default output to STDERR using the C command. See the docs
204             for that command for more detail.
205              
206             =head2 Displaying "invisible" strings
207              
208             To facilitate telling the difference between C<[undef]> and an empty string,
209             functions output the strings "[undef]" and "[empty string]". So, for example,
210             this code:
211              
212             println undef;
213             println "";
214              
215             produces this:
216              
217             [undef]
218             [empty string]
219              
220             =head1 FUNCTION DESCRIPTIONS
221              
222             =cut
223              
224             #
225             # opening POD
226             #------------------------------------------------------------------------------
227              
228              
229             #------------------------------------------------------------------------------
230             # default
231             # private subroutine
232             #
233             sub default {
234 0     0 0   for (my $i=0; $i<=$#_; $i++) {
235 0 0         defined($_[$i]) and return $_[$i];
236             }
237            
238 0           return undef;
239             }
240             #
241             #------------------------------------------------------------------------------
242              
243              
244              
245             #------------------------------------------------------------------------------
246             # println
247             #
248              
249             =head2 println
250              
251             C was the original Debug::ShowStuff function. It simply outputs the
252             given values.
253              
254             In text mode it adds a newline to the end.
255              
256             For example, this code:
257              
258             println "hello world";
259              
260             produces this output, including the newline:
261              
262             hello world
263              
264             In L it puts the output inside a

element. The values are HTML

265             escaped so that HTML-significant characters like < and > are actually
266             displayed as < and >. The

element has CSS styles set so that the

267             characters are always black, the background is always white, text is
268             left-aligned, and the

element has a black border, regardless of the styles

269             of the surrounding elements. So, for example, in web mode, the following code:
270              
271             println 'whatever';
272              
273             outputs the following HTML:
274              
275            

whatever

276              
277             Like other "show" functions, undef is output as the string "[undef]" and
278             an empty string is output as the string "[empty string]".
279              
280             Values in the arguments array are output concatenated together with no
281             spaces in between. Each value is evaluated independently for if it
282             is undef, empty string, or a string with visible content. So, for example,
283             this code:
284              
285             println "whatever", "", undef, "dude";
286              
287             outputs this:
288              
289             whatever[empty string][undef]dude
290              
291             =cut
292              
293             # And after all that documentation, the sub is only one line long. println
294             # actually calls the private sub "printer" with a few extra arguments. println
295             # shares printer with printnorm.
296              
297             sub println {
298 0     0 1   return printer (wantarray(), 'p', "\n", @_);
299             }
300             #
301             # println
302             #------------------------------------------------------------------------------
303              
304              
305             #------------------------------------------------------------------------------
306             # indent
307             #
308              
309             =head2 indent()
310              
311             C is for situations where you're outputting a lot of stuff and you
312             want to tidy up the putput with indentation.
313             In L the output is indented with 3 spaces per
314             indentation level. In web mode the output is indented with 20px per
315             indentation level.
316              
317             C must be assigned to a variable or it has no effect. C
318             increases the indent level by one. When the variable goes out of scope, the
319             indent level is decreased by one.
320              
321             For example suppose you want to display the values of records from a database.
322             You might loop through the records, outputting them like this:
323              
324             while (my $record = $sth->fetchrow_hashref) {
325             println $record->{'name_nick'};
326             my $indent = indent();
327             showhash $record;
328             }
329              
330             That would produce output something like this:
331              
332             Ricky
333             ---------------------------------------
334             name_first = Rick
335             name_last = Adams
336             ---------------------------------------
337              
338             Dan
339             ---------------------------------------
340             name_first = Daniel
341             name_last = Bradley
342             ---------------------------------------
343              
344             By default, three spaces are used to indent. To change that set
345             $Debug::ShowStuff::indent_tab to whatever string you want to use for
346             indentation.
347              
348             B bottom_space
349              
350             The C option indicates to output an extra line at the bottom
351             of the indented output, just to give some extra division before the next
352             batch of code. For example, the following code does not use C:
353              
354             foreach my $name (qw[Larry Moe]) {
355             println $name;
356             my $indent = indent(bottom_space=>1);
357             println 'years: ', length($name);
358             }
359              
360             and so produces the following output:
361              
362             Larry
363             years: 5
364             Moe
365             years: 3
366              
367             But this code:
368              
369             foreach my $name (qw[Larry Moe]) {
370             println $name;
371             my $indent = indent(bottom_space=>1);
372             println 'years: ', length($name);
373             }
374              
375             produces this output:
376              
377             Larry
378             years: 5
379              
380             Moe
381             years: 3
382              
383             =cut
384              
385             sub indent {
386 0     0 1   my (%opts) = @_;
387 0           return Debug::ShowStuff::Indent->new(%opts);
388             }
389             #
390             # indent
391             #------------------------------------------------------------------------------
392              
393              
394             #------------------------------------------------------------------------------
395             # showstuff
396             #
397              
398             =head2 showstuff()
399              
400             This function turns on/off most of the functions in this module, with one
401             important exception explained below. The function also returns the state of
402             whether or not Debug::ShowStuff is on/off.
403              
404             If a parameter is sent, that param is used to turn display on/off. The
405             value is stored in the global variable $Debug::ShowStuff::active.
406              
407             The function is also used by most subroutines to determine if they should
408             actually output anything. $Debug::ShowStuff::active is not the only criteria
409             used to determine if Debug::ShowStuff is active. The algorithm is as follows:
410              
411             - If the environment variable $ENV{'SHOWSTUFF'} is defined and false then
412             showstuff() returns false regardless of the state of $active.
413              
414             - If the environment variable $ENV{'SHOWSTUFF'} is not defined or is defined
415             and true then showstuff() uses $Debug::ShowStuff::active to determine on/off.
416              
417             The purpose of this algorithm is to allow the use of debugging display in
418             situations where one perl script calls another, such as in regression testing.
419              
420             For example, suppose you have a script as follows:
421              
422             #!/usr/bin/perl -w
423             use strict;
424             use Debug::ShowStuff ':all';
425            
426             my ($rv);
427            
428             println 'running my_function()';
429             $rv = my_function();
430             println 'the returned value is: ', $rv;
431            
432             $rv or die 'error!';
433              
434             The output of the script might look something like this:
435              
436             running my_function()
437             1
438              
439             Now suppose you call that and other scripts from some OTHER script, and
440             you don't want the screen cluttered with all that debugging, you just want
441             to see if all those scripts run successfully. You could use $ENV{'SHOWSTUFF'}
442             to turn off showing stuff:
443              
444             #!/usr/bin/perl -w
445             use strict;
446             use Debug::ShowStuff ':all';
447            
448             my @tests = ("./script1.pl", "./script2.pl", "./script3.pl");
449             $ENV{'SHOWSTUFF'} = 0;
450            
451             foreach my $test () {
452             system($test) and die "$test failed";
453             }
454              
455             In that case, none of the stuff from the test scripts would be output.
456              
457             =cut
458              
459             sub showstuff {
460 0 0   0 1   if (@_)
461 0           { $active = $_[0] }
462            
463             # if SHOWSTUFF environment variable is defined and false
464 0 0 0       if ( defined($ENV{'SHOWSTUFF'}) && (! $ENV{'SHOWSTUFF'}) )
465 0           { return 0 }
466            
467             # else use $active
468 0           return $active;
469             }
470             #
471             # showstuff
472             #------------------------------------------------------------------------------
473              
474              
475              
476             #------------------------------------------------------------------------------
477             # htmlesc
478             #
479             # Private sub. Formats a string for literal output in HTML. An undefined
480             # first argument is returned as an empty string.
481             #
482             # sub htmlesc {
483             # my ($rv) = @_;
484             # return '' unless defined($rv);
485             # $rv =~ s|&|&|g;
486             # $rv =~ s|"|"|g;
487             # $rv =~ s|'|'|g;
488             # $rv =~ s|<|<|g;
489             # $rv =~ s|>|>|g;
490             # return $rv;
491             # }
492             #
493             # htmlesc
494             #------------------------------------------------------------------------------
495              
496              
497              
498             #------------------------------------------------------------------------------
499             # printnorm
500             #
501              
502             =head2 printnorm
503              
504             Works like println but doesn't add trailing newline. In web environment uses
505             instead of

.

506              
507             =cut
508              
509             sub printnorm {
510 0     0 1   return printer (wantarray(), 'span', '', @_);
511             }
512             #
513             # printnorm
514             #------------------------------------------------------------------------------
515              
516              
517             #------------------------------------------------------------------------------
518             # printer
519             # Private sub: called by both println and printnorm
520             #
521             sub printer {
522 0     0 0   my ($context, $html_el, $newline, @args) = @_;
523            
524 0 0         showstuff() or return '';
525            
526 0           my ($str);
527 0           my $fh = getfh($context);
528            
529             # special case: no arguments: just output an eol and return
530 0 0         if (! @args) {
531 0           print $fh "\n";
532 0           return;
533             }
534            
535             # get final string, including stuff like [undef]
536 0           $str = join('', map {define_show($_)} @args);
  0            
537            
538             # print as web page
539 0 0         if (inweb()) {
540 0           my $indent = web_indent();
541            
542 0           print $fh
543             qq|<$html_el style="${indent}background-color:white;color:black;text-align:left">|,
544             htmlesc($str),
545             "\n";
546             }
547            
548             # else print as text
549             # add indents at start and at every newline
550             else {
551 0           my ($indent);
552 0           $indent = '';
553            
554 0           for (1..$indent_level)
555 0           { $indent .= $indent_tab }
556            
557 0           $str =~ s|\n|\n$indent|gs;
558 0           $str = $indent . $str;
559            
560 0           print $fh $str, $newline;
561             }
562            
563 0 0         ismem($fh) and return $fh->mem();
564             }
565             #
566             # printer
567             #------------------------------------------------------------------------------
568              
569              
570             #------------------------------------------------------------------------------
571             # web_indent
572             #
573              
574             # constant: how many pixels for a single web indent
575 1     1   11 use constant WEB_INDENT => 20;
  1         2  
  1         5980  
576              
577             sub web_indent {
578 0     0 0   my ($indent);
579            
580 0 0         if ($indent_level) {
581 0           $indent =
582             'margin-left:' .
583             ($indent_level * WEB_INDENT) .
584             ';';
585             }
586             else {
587 0           $indent = '';
588             }
589            
590 0           return $indent;
591             }
592             #
593             # web_indent
594             #------------------------------------------------------------------------------
595              
596              
597             #------------------------------------------------------------------------------
598             # showhash
599             #
600              
601             =head2 showhash
602              
603             Displays the keys and values in a hash. Input is either a single hash
604             reference or a regular hash. The key=values pairs are sorted by the names
605             of the keys.
606              
607             So, for example, the following code:
608              
609             my %hash = (
610             Larry => 'curly headed guy',
611             Curly => 'funny bald guy',
612             Moe => 'guy in charge',
613             );
614              
615             showhash %hash;
616              
617             Produces the following output. Notice that the keys are in alphabetic order:
618              
619             ---------------------------------------
620             Curly = funny bald guy
621             Larry = curly headed guy
622             Moe = guy in charge
623             ---------------------------------------
624              
625             This code, using a hash reference, produces exactly the same output:
626              
627             my $hash = {
628             Larry => 'curly headed guy',
629             Curly => 'funny bald guy',
630             Moe => 'guy in charge',
631             };
632              
633             showhash $hash;
634              
635             If the hash is empty, then that fact is output. So, this code:
636              
637             showhash {};
638              
639             produces this output:
640              
641             ---------------------------------------
642             [empty hash]
643             ---------------------------------------
644              
645             If an undef value is sent instead of a hashref, then that fact is displayed
646             instead of a hash. For example consider the following code that uses
647             a variable that is undef:
648              
649             my ($hash);
650             showhash $hash;
651              
652             That code produces this output:
653              
654             ---------------------------------------
655             Only one element input and it was undefined
656             ---------------------------------------
657              
658             Optional arguments only come into play if the first argument is a hashref.
659              
660             B title => "string"
661              
662             If this option is sent, the string is displayed at the top of the
663             display of the hash values. So this code:
664              
665             my $hash = {
666             Larry => 'curly headed guy',
667             Curly => 'funny bald guy',
668             Moe => 'guy in charge',
669             };
670              
671             showhash $hash, title=>'Stooges';
672              
673             produces this output:
674              
675             --- Stooges ---------------------------------
676             Curly = funny bald guy
677             Larry = curly headed guy
678             Moe = guy in charge
679             ---------------------------------------------
680              
681              
682             B line_cut => 1
683              
684             If the C option is sent, then each value is truncated after the first
685             newline if there is one. The fact that there is more output is mentioned. So
686             the following code:
687              
688             my $hash = {
689             Larry => "curly\nheaded guy",
690             Curly => "funny\nbald guy",
691             Moe => "guy\nin charge",
692             };
693              
694             showhash $hash, line_cut =>1;
695              
696             produces this output.
697              
698             ---------------------------------------
699             Curly = funny [more lines...]
700             Larry = curly [more lines...]
701             Moe = guy [more lines...]
702             ---------------------------------------
703              
704             Several other options do exactly the same thing: linecut, line_chop, and first_line.
705              
706             =cut
707              
708             sub showhash {
709 0 0   0 1   showstuff() or return '';
710            
711             # HTML
712 0 0         if (inweb())
713 0           { return showhashhtml(@_) }
714            
715             # plain text
716             else
717 0           { return showhashplain(@_) }
718             }
719             #
720             # showhash
721             #------------------------------------------------------------------------------
722              
723              
724             #------------------------------------------------------------------------------
725             # showhashhtml
726             #
727             # Private sub. Displays the keys and values in a hash, formatted for HTML.
728             #
729             # Code in this sub is not indented because it uses a lot of here documents.
730             #
731             sub showhashhtml {
732              
733 0     0 0   my %myhash;
734 0           my $maxkey = 0;
735 0           my $maxval = 0;
736 0           my $fh = getfh(wantarray);
737 0           my $indent = web_indent();
738 0           my (%opts, $linecut, @keys, $id_prefix, $table_tag);
739              
740             # open table
741 0           $table_tag = STDTABLE;
742 0           $table_tag =~ s|STYLE|$indent|s;
743 0           print $fh $table_tag;
744              
745             # special case: only one element and it's undefined
746 0 0 0       if ( (@_ == 1) && (! defined($_[0])) ) {
747 0           print $fh "
Only element input and it was undefined
\n";
748 0           return;
749             }
750              
751 0 0         if (ref $_[0]){
752 0           %myhash = %{$_[0]};
  0            
753 0           %opts = @_[1..$#_];
754 0   0       $linecut = $opts{'line_cut'} || $opts{'linecut'} || $opts{'line_chop'} || $opts{'first_line'};
755             }
756             else {
757 0           %myhash = @_;
758             }
759              
760 0 0         if (ref $_[0]) {
761 0           my $title;
762            
763 0 0         if (defined $opts{'title'})
  0            
764 0           {$title = $opts{'title'}}
765             else
766             {$title = $_[0]}
767            
768 0           print $fh '
', htmlesc($title), "
769             }
770              
771 0           print $fh <<"(TABLETOP2)";
772            
773             key
774                
775             value
776            
777             (TABLETOP2)
778              
779             # get array of keys
780 0           @keys = keys(%myhash);
781              
782             # set ID prefix if opted to do so
783 0           $id_prefix = $opts{'id_prefix'};
784              
785             # sort keys unless sort param is sent as false
786 0 0         if (default $opts{'sort'}, 1) {
787 0           @keys = sort { lc($a) cmp lc($b) } @keys;
  0            
788             }
789              
790             # loop through keys, outputting key=value pairs
791 0           foreach my $key (@keys) {
792 0           my $val = $myhash{$key};
793            
794 0 0         if ($linecut){
795 0           $val =~ s|\n.*||s;
796 0           $val .= '...';
797             }
798            
799             # $id_prefix
800            
801 0           print $fh
802             '
803             '', htmlesc($key), '
804             '
805             '';
806            
807 0 0         if (defined $id_prefix) {
808 0           print $fh
809             ' 810             $id_prefix, '_',
811             htmlesc($key),
812             '">',
813             }
814            
815 0           print $fh htmlesc($val);
816            
817 0 0         if (defined $id_prefix) {
818 0           print $fh '',
819             }
820            
821 0           print $fh '
822             }
823              
824             # if empty hash, output that fact
825 0 0         if (! @keys) {
826 0           print $fh
827             '
828             'empty hash
829             "
830             }
831              
832             # close table
833 0           print $fh "
\n

\n"; 834               835 0 0         ismem($fh) and return $fh->mem; 836 0           return ''; 837             } 838             # 839             # showhashhtml 840             #------------------------------------------------------------------------------ 841               842               843             #------------------------------------------------------------------------------ 844             # showhashplain 845             # 846             # Private sub. Displays the keys and values in a hash, formatted using plain text. 847             # 848             sub showhashplain { 849 0     0 0   my %myhash; 850 0           my $maxkey = 0; 851 0           my $maxval = 0; 852 0           my $fh = getfh(wantarray); 853 0           my (%opts, $skipempty, %showfields, $linecut, $divider); 854             855             # get title 856 0 0         if (ref $_[0]) { 857 0           %myhash = %{$_[0]};   0             858 0           %opts = @_[1..$#_]; 859             860 0 0         if (defined $opts{'title'})   0             861             {$divider = '--- ' . $opts{'title'} . ' ---------------------------------'} 862             } 863             864 0 0         if (! defined $divider) 865 0           { $divider = '---------------------------------------' } 866             867 0           add_indents($fh); 868 0           print $fh $divider, "\n"; 869               870 0           $divider =~ s|.|\-|gs; 871             872             # special case: only one element and it's undefined 873 0 0 0       if ( (@_ == 1) && (! defined($_[0])) ) { 874 0           add_indents($fh); 875 0           print $fh "Only one element input and it was undefined\n"; 876 0           add_indents($fh); 877 0           print $fh $divider, "\n\n"; 878             879 0 0         ismem($fh) and return $fh->mem(); 880 0           return ''; 881             } 882             883             # if first element is a reference, assume it's the hash to be displayed 884 0 0         if (ref $_[0]){ 885 0   0       $linecut = $opts{'line_cut'} || $opts{'line_chop'} || $opts{'first_line'}; 886 0           $skipempty = $opts{'skipempty'}; 887             888 0 0         if (defined $opts{'showfields'}) { 889 0 0         if (ref $opts{'showfields'})   0             890 0           {@showfields{@{$opts{'showfields'}}} = ()}   0             891             else 892             {$showfields{ $opts{'showfields'} } = ()} 893             } 894             } 895             896             # else all arguments form hash to be displayed 897             else { 898 0           %myhash = @_; 899             } 900             901             # if empty hash 902 0 0         if (! keys(%myhash)) { 903 0           add_indents($fh); 904 0           print $fh "[empty hash]\n"; 905             } 906             907             # not empty hash 908             else { 909 0           my ($keywidth, @keys); 910 0           $keywidth = longestkey(\%myhash); 911             912 0           @keys = keys(%myhash); 913             914             # sort keys unless sort param is sent as false 915 0 0         if (default $opts{'sort'}, 1) { 916 0           @keys = sort { lc($a) cmp lc($b) } @keys;   0             917             } 918             919             # @keys = sort { lc($a) cmp lc($b) } @keys; 920               921             KEYLOOP: 922 0           foreach my $key (@keys) { 923             # if there's a specified list of fields to show 924 0 0 0       if ( %showfields && (! exists $showfields{$key}) )   0             925             {next KEYLOOP} 926             927 0           my $value = $myhash{$key}; 928             929             # if we should skip empty values 930 0 0 0       if (       0         931             $skipempty && 932             ( 933             (! defined $value) || 934             ($value !~ m|\S|s) 935             ) 936             ) 937 0           { next KEYLOOP } 938             939             # linecut 940 0 0         if ($linecut) { 941 0 0 0       if ( (defined $value) && ($value =~ s|[\r\n].*||s) ) 942 0           { $value .= ' [more lines...]' } 943             } 944             945 0           add_indents($fh); 946 0           print $fh 947             spacepad($key, $keywidth), ' = ', 948             define_show($value), "\n"; 949             } 950               951             } 952             953 0           add_indents($fh); 954 0           print $fh $divider, "\n\n"; 955             956 0 0         ismem($fh) and return $fh->mem(); 957 0           return ''; 958             } 959             # 960             # showhashplain 961             #------------------------------------------------------------------------------ 962               963               964             #------------------------------------------------------------------------------ 965             # showarr, showarray 966             # 967               968             =head2 showarr, showarray 969               970             Displays the values of an array. c and c 971               972             Each element is displayed in a table row (in L) 973             or on a separate line (in text mode). 974               975             If C receives exactly one argument, and if that item is an array 976             reference, then the routine assumes that you want to display the elements in 977             the referenced array. Therefore, the following blocks of code display the 978             same thing: 979               980             showarray @myarr; 981             showarray \@myarr; 982               983             =cut 984               985             sub showarray { 986 0 0   0 1   showstuff() or return ''; 987             988 0           my (@arr) = @_; 989 0           my $fh = getfh(wantarray); 990             991             # if first and only element is an array ref, use that as full array 992 0 0 0       if ( (@arr == 1) && UNIVERSAL::isa($arr[0], 'ARRAY') )   0             993 0           {@arr = @{$arr[0]}} 994             995             #------------------------------------------------------ 996             # HTML 997             # 998 0 0         if (inweb()) { 999 0           print $fh 1000             qq|

\n

\n|, |; \n";
1001             qq|
array
1002            
1003 0           foreach my $el (@arr){
1004 0           print $fh '
';
1005            
1006 0 0         if (defined $el){
1007 0 0         if ($el =~ m|\S|)
1008 0           { print $fh htmlesc($el) }
1009             else
1010 0           { print $fh 'no content string' }
1011             }
1012            
1013             else {
1014 0           print $fh 'undefined';
1015             }
1016            
1017 0           print $fh "
1018             }
1019            
1020 0           print $fh qq|
\n

\n|; 1021             } 1022             # 1023             # HTML 1024             #------------------------------------------------------ 1025             1026             1027             #------------------------------------------------------ 1028             # text 1029             # 1030             else { 1031 0           my $line = "------------------------------------\n"; 1032 0           my ($firstdone); 1033             1034 0           add_indents($fh); 1035 0           print $fh $line; 1036             1037 0           foreach my $el (@arr){ 1038 0           add_indents($fh); 1039 0           print $fh define_show($el), "\n"; 1040             1041 0           $firstdone = 1; 1042             } 1043             1044             1045 0 0         if (! $firstdone) { 1046 0           add_indents($fh); 1047 0           print $fh "[empty array]\n"; 1048             } 1049             1050 0           add_indents($fh); 1051 0           print $fh $line; 1052             } 1053             # 1054             # text 1055             #------------------------------------------------------ 1056             1057 0 0         ismem($fh) and return $fh->mem(); 1058             } 1059               1060 0     0 1   sub showarr{showarray(@_)} 1061             # 1062             # showarr, showarray 1063             #------------------------------------------------------------------------------ 1064               1065               1066               1067             #------------------------------------------------------------------------------ 1068             # showarrdiv 1069             # 1070               1071             =head2 showarraydiv 1072               1073             Works just like C, except that in text mode displays a solid line between 1074             each element of the array. 1075               1076             =cut 1077               1078             sub showarraydiv { 1079 0 0   0 1   showstuff() or return ''; 1080             1081 0           my (@arr) = @_; 1082 0           my $fh = getfh(wantarray); 1083             1084 0 0 0       if ( (@arr == 1) && UNIVERSAL::isa($arr[0], 'ARRAY') )   0             1085 0           {@arr = @{$arr[0]}} 1086             1087             #------------------------------------------------------ 1088             # HTML 1089             # 1090 0 0         if (inweb()) { 1091 0           print $fh 1092             "

\n

\n", "; \n"}
1093             "
array
1094            
1095 0           foreach my $el (@arr)
  0            
1096             {print $fh '
', htmlesc($el), "
1097            
1098 0           print $fh "
\n

\n"; 1099             } 1100             # 1101             # HTML 1102             #------------------------------------------------------ 1103             1104             1105             #------------------------------------------------------ 1106             # text 1107             # 1108             else { 1109 0           my $line = "------------------------------------\n"; 1110 0           my ($firstdone); 1111             1112 0           print $fh $line; 1113             1114 0           foreach my $el (@arr){ 1115             #if (defined $el) 1116             # {print $fh $el, "\n"} 1117             #else 1118             # {print $fh "[undef]\n"} 1119             1120 0           print $fh define_show($el); 1121             1122 0           print $fh $line; 1123 0           $firstdone = 1; 1124             } 1125             1126 0 0         if (! $firstdone)   0             1127             {print $fh "[empty array]\n", $line} 1128             } 1129             # 1130             # text 1131             #------------------------------------------------------ 1132             1133 0 0         ismem($fh) and return $fh->mem(); 1134             } 1135               1136 0     0 0   sub showarrdiv{showarraydiv(@_)} 1137             # 1138             # showarraydiv 1139             #------------------------------------------------------------------------------ 1140               1141               1142               1143             #------------------------------------------------------------------------------ 1144             # showscalar 1145             # 1146               1147             =head2 showscalar 1148               1149             Outputs the value of a scalar. The name is slightly innaccurate: you can 1150             input an array. The array will be joined together to form a single scalar. 1151               1152             Actually, I hardly ever use C, but it seemed unbalanced to have 1153             C and C without C. 1154               1155             =cut 1156               1157             sub showscalar { 1158 0 0   0 1   showstuff() or return ''; 1159             1160 0           my (@arr) = @_; 1161 0           my $fh = getfh(wantarray); 1162             1163               1164             #------------------------------------------------------ 1165             # HTML 1166             # 1167 0 0         if (inweb()) { 1168 0           print $fh 1169             "

\n

\n",
1170             "
scalar
"; 
1171            
1172 0           foreach my $el (@arr)
  0            
1173             {print $fh htmlesc($el)}
1174            
1175 0           print $fh "
\n

\n"; 1176             } 1177             # 1178             # HTML 1179             #------------------------------------------------------ 1180             1181             1182             #------------------------------------------------------ 1183             # text 1184             # 1185             else { 1186 0           print $fh "------------------------------------\n"; 1187             1188 0 0         if (@arr) { 1189 0           print $fh 1190             join( 1191             '', 1192 0           map {define_show($_)} 1193             1194             sort( 1195             { 1196 0           define_show($a) cmp 1197             define_show($b) 1198             } @arr 1199             ) 1200             ), 1201             1202             "\n"; 1203             } 1204             1205             # {print $fh join('', map {defined($_) ? $_ : '[undef]'} sort({(defined($a) ? $a : '') cmp (defined($b) ? $b : '')} @arr)), "\n"} 1206             1207             else { 1208 0           print $fh "[no elements]\n"; 1209             } 1210             1211 0           print $fh "------------------------------------\n"; 1212             } 1213             # 1214             # text 1215             #------------------------------------------------------ 1216             1217 0 0         ismem($fh) and return $fh->mem(); 1218             } 1219               1220 0     0 0   sub showsca{showscalar(@_)} 1221             # 1222             # showscalar 1223             #------------------------------------------------------------------------------ 1224               1225               1226             #------------------------------------------------------------------------------ 1227             # showcgi 1228             # 1229               1230             =head2 showcgi 1231               1232             Displays the CGI parameter keys and values. This sub always outputs HTML. 1233               1234             There are several optional parameters, described in the following sections. 1235               1236             B q 1237               1238             The optional parameter C, may be a CGI query object: 1239               1240             my $query = CGI->new(); 1241             showcgi q => $query; 1242               1243             If C is not sent, then a CGI object is created on the fly. 1244               1245             B skipempty 1246               1247             If the optional parameter C is true: 1248               1249             showcgi skipempty => 1; 1250               1251             then CGI params that are empty (i.e. do not have 1252             at least one non-space character) are not displayed. 1253               1254             B skip 1255               1256             C sets a list of parameters to not display. For example, if you don't 1257             want to see the C or C params, then call showcgi like this: 1258               1259             showcgi skip => ['choices', 'toppings']; 1260               1261             Single item lists can be passed in directly without putting them in 1262             an anonymous array: 1263               1264             showcgi skip => 'choices'; 1265               1266             =cut 1267               1268             sub showcgi { 1269 0 0   0 1   showstuff() or return ''; 1270               1271 0           my ($q, %opts) = @_; 1272 0           my (@keys, $fh, $skipempty, %skip, $table_tag); 1273 0           my $indent = web_indent(); 1274               1275             # $q = $opts{'r'} || $opts{'q'} || $opts{'cgi'} || CGI->new(); 1276 0           $skipempty = $opts{'skipempty'}; 1277               1278 0 0         if (defined $opts{'skip'})   0             1279             {@skip{asarr($opts{'skip'})} = ()} 1280               1281 0           @keys = sort $q->param; 1282 0           $fh = getfh(wantarray); 1283               1284             # open table 1285 0           $table_tag = STDTABLE; 1286 0           $table_tag =~ s|STYLE|$indent|s; 1287 0           print $fh $table_tag; 1288               1289             # title 1290 0           print $fh <<"(TABLETITLE)"; 1291             1292             CGI params 1293             1294             (TABLETITLE) 1295               1296               1297             # special case: no elements 1298 0 0         if (! @keys) { 1299 0           print $fh "No params\n"; 1300 0           return; 1301             } 1302               1303 0           print $fh <<"(TABLETOP2)"; 1304             1305             key 1306                 1307             value 1308             1309             (TABLETOP2) 1310               1311             PARAMLOOP: 1312 0           foreach my $key (@keys){ 1313 0           my @vals = $q->param($key); 1314             1315 0 0         if (exists $skip{$key})   0             1316             {next PARAMLOOP} 1317             1318 0 0 0       if ($skipempty && @vals <= 1) { 1319 0           my $val = $vals[0]; 1320             1321 0 0 0       if ( (! defined $val) || ($val !~ m|\S|) )   0             1322             {next PARAMLOOP} 1323             } 1324             1325 0           print $fh 1326             '', 1327             htmlesc($key), 1328             ''; 1329             1330 0 0         if (@vals > 1) { 1331             # open table 1332 0           $table_tag = STDTABLE; 1333 0           $table_tag =~ s|STYLE||s; 1334 0           print $fh $table_tag; 1335             1336 0           foreach my $val (@vals) { 1337 0           print $fh 1338             '', 1339             htmlesc($val), 1340             "\n"; 1341             } 1342             1343 0           print "\n"; 1344             } 1345             1346             else { 1347 0           print $fh 1348             htmlesc($vals[0]); 1349             } 1350             1351 0           print $fh "\n"; 1352             } 1353               1354 0           print $fh "\n

\n"; 1355               1356 0 0         ismem($fh) and return $fh->mem; 1357 0           return ''; 1358             } 1359             # 1360             # showcgi 1361             #------------------------------------------------------------------------------ 1362               1363               1364             #------------------------------------------------------------------------------ 1365             # showref 1366             # 1367               1368             =head2 showref($ref, %options) 1369               1370             Displays a hash, array, or scalar references, treeing down through other 1371             references it contains. So, for example, the following code: 1372               1373             my $ob = { 1374             name => 'Raha', 1375             email => 'raha@idocs.com', 1376             friends => [ 1377             'Shalom', 1378             'Joe', 1379             'Furocha', 1380             ], 1381             }; 1382             1383             showref $ob; 1384               1385             produces the following output: 1386               1387             /-----------------------------------------------------------\ 1388             friends = 1389             ARRAY 1390             Shalom 1391             Joe 1392             Furocha 1393             email = raha@idocs.com 1394             name = Raha 1395             \-----------------------------------------------------------/ 1396               1397             The values of the hash or arrays being referenced are only displayed once, so 1398             you're safe from infinite recursion. 1399               1400             There are several optional parameters, described in the following sections. 1401               1402             B maxhash 1403               1404             The C option allows you to indicate the maximum number of hash 1405             elements to display. If a hash has more then C elements then none of 1406             them are displayed or recursed through, and instead an indicator of how many 1407             elements there are is output. So, for example, the following command only 1408             displays the hash values if there are 10 or fewer elements in the hash: 1409               1410             showref $myob, maxhash=>10; 1411             1412               1413             If C is not sent then there is no maximum. 1414               1415             B maxarr 1416               1417             The C option allows you to indicate the maximum number of array 1418             elements to display. If an array has more then C elements then none 1419             of them are displayed or recursed through, and instead an indicator of how 1420             many elements there are is output. If C is not sent then there is no 1421             maximum. 1422               1423             B depth 1424               1425             The C option allows you to indicate a maximum depth to display in the 1426             tree. If C is not sent then there is no maximum depth. 1427               1428             B skip 1429               1430             A list of hash elements to skip. Only applies to the top element and only if 1431             it is a hash. 1432               1433             B skipall 1434               1435             Works the same as C, but applies to all hashes in the structure, not 1436             just the top-level hash. 1437               1438             =cut 1439               1440             sub showref { 1441 0 0   0 1   showstuff() or return ''; 1442             1443 0           my ($ref, %opts) = @_; 1444 0           my ($indentnum, $indent, $type, $tab, %skip, $finalfh); 1445 0   0       my $fh = $opts{'fh'} || getfh(wantarray); 1446             1447             1448             # hash of keys to skip 1449 0           @skip{asarr(delete $opts{'skip'})} = (); 1450 0           @skip{asarr($opts{'skipall'})} = (); 1451             1452             # set some variables 1453 0           $indentnum = $opts{'indent'}; 1454 0   0       $indentnum ||= 0; 1455 0           $tab = ' '; 1456 0           $indent = $tab x $indentnum; 1457 0   0       $opts{'done'} ||= {}; 1458             1459 0           $type = "$ref"; 1460 0           $type =~ s|^[^\=]*\=||; 1461 0           $type =~ s|\(.*||; 1462             1463 0 0         if (inweb())   0             1464             {print $fh qq|

\n|} 




1465




 





 





 





 





 





 



 	 




1466




0




  
  0
  




 





 





 





 



 	if (! $indent) 




 




0





 





 





 





 





 



   




1467




 





 





 





 





 





 



 		{print $fh "/----------------------------------------------------------------------------\\\n"} 




1468




 





 





 





 





 





 



 	 




1469




0




  
  0
  




 





 





 





 



 	if ($type eq 'HASH') { 




 




 




  
  0
  




 





 





 





 



   




1470




 





 





 





 





 





 



 		# if we've recursed to the maximum level 




1471




0




  
  0
  



  
  0
  




 





 





 



 		if ( 




 




 





 




  
  0
  




 





 





 



   




 




 





 




  
  0
  




 





 





 



   




1472




0





 





 





 





 





 



 			$opts{'indent'} &&  




1473




 





 





 





 





 





 



 			($opts{'indent'}>1) &&  




1474




 





 





 





 





 





 



 			$opts{'maxhash'} && (keys(%{$ref}) > $opts{'maxhash'}) ) { 




1475




0





 





 





 





 





 



 			my $count = keys %{$ref}; 




 




0





 





 





 





 





 



   




1476




 





 





 





 





 





 



 			 




1477




0




  
  0
  




 





 





 





 



 			print $fh 




1478




 





 





 





 





 





 



 				$indent, '[', $count, ' hash element', 




1479




 





 





 





 





 





 



 				($count>1 ? 's' : ''), "]\n"; 




1480




 





 





 





 





 





 



 		} 




1481




 





 





 





 





 





 



   




1482




 





 





 





 





 





 



 		# else we haven't recursed to the maximum level 




1483




 





 





 





 





 





 



 		else { 




1484




0




  
  0
  




 





 





 





 



 			if ($opts{'labelself'}) { 




1485




0





 





 





 





 





 



 				print $fh $indent, "HASH\n"; 




1486




0





 





 





 





 





 



 				$indentnum++; 




1487




0





 





 





 





 





 



 				$indent .= $tab; 




1488




 





 





 





 





 





 



 			} 




1489




 





 





 





 





 





 



 			 




1490




 





 





 





 





 





 



 			ELLOOP: 




1491




0





 





 





 





 





 



 			while ( my($n, $v) = each(%{$ref}) ) { 




 




0





 





 





 





 





 



   




1492




0




  
  0
  




 





 





 





 



 				exists($skip{$n}) and next ELLOOP; 




1493




 





 





 





 





 





 



 				 




1494




0





 





 





 





 





 



 				print $fh $indent, $n, ' = '; 




1495




 





 





 





 





 





 



 				 




1496




0




  
  0
  




 





 





 





 



 				if (ref $v) { 




1497




0




  
  0
  




 





 





 





 



 					if ( $opts{'depth'} ? ($opts{'depth'} >= $indentnum) : 1 ) { 




 




0




  
  0
  




 





 





 





 



   




1498




0




  
  0
  




 





 





 





 



 						if ($opts{'done'}->{$v}) 




 




0





 





 





 





 





 



   




1499




 





 





 





 





 





 



 							{print $fh "[redundant]\n"} 




1500




 





 





 





 





 





 



 						else { 




1501




0





 





 





 





 





 



 							$opts{'done'}->{$v} = 1; 




1502




0





 





 





 





 





 



 							print $fh "\n"; 




1503




0





 





 





 





 





 



 							showref($v, %opts, done=>$opts{'done'}, indent=>$indentnum+1, fh=>$fh) 




1504




 





 





 





 





 





 



 						} 




1505




 





 





 





 





 





 



 					} 




1506




 





 





 





 





 





 



 					else  




1507




 





 





 





 





 





 



 						{print $fh $v} 




1508




 





 





 





 





 





 



 				} 




1509




 





 





 





 





 





 



 				 




1510




 





 





 





 





 





 



 				#elsif (defined $v) 




1511




 





 





 





 





 





 



 				#	{print $fh $v, "\n"} 




1512




 





 





 





 





 





 



 				#else 




1513




 





 





 





 





 





 



 				#	{print $fh "[undef]\n"} 




1514




 





 





 





 





 





 



 				 




1515




 





 





 





 





 





 



 				else { 




1516




0





 





 





 





 





 



 					print $fh define_show($v); 




1517




 





 





 





 





 





 



 				} 




1518




 





 





 





 





 





 



 			} 




1519




 





 





 





 





 





 



 		} 




1520




 





 





 





 





 





 



 	} 




1521




 





 





 





 





 





 



 	 




1522




 





 





 





 





 





 



 	elsif ($type eq 'ARRAY') { 




1523




0





 





 





 





 





 



 		print $fh $indent, "ARRAY\n"; 




1524




 





 





 





 





 





 



 		 




1525




0




  
  0
  



  
  0
  




 





 





 



 		if ($opts{'maxarr'} && (@{$ref}) > $opts{'maxarr'} ) { 




 




0





 





 





 





 





 



   




1526




0





 





 





 





 





 



 			print 




1527




0





 





 





 





 





 



 				$indent, $tab, '[', scalar(@{$ref}), ' element', 




1528




0




  
  0
  




 





 





 





 



 				(@{$ref}>1 ? 's' : ''), "]\n"; 




1529




 





 





 





 





 





 



 		} 




1530




 





 





 





 





 





 



 		 




1531




 





 





 





 





 





 



 		else { 




1532




0





 





 





 





 





 



 			my ($firstdone); 




1533




 





 





 





 





 





 



 			 




1534




0





 





 





 





 





 



 			foreach my $v ( @{$ref} ) { 




 




0





 





 





 





 





 



   




1535




0




  
  0
  




 





 





 





 



 				if (ref $v) { 




1536




0




  
  0
  




 





 





 





 



 					if ( $opts{'depth'} ? ($opts{'depth'} >= $indentnum) : 1 ) { 




 




0




  
  0
  




 





 





 





 



   




1537




0




  
  0
  




 





 





 





 



 						if ($opts{'done'}->{$v}) 




 




0





 





 





 





 





 



   




1538




 





 





 





 





 





 



 							{print $fh $indent, $tab, '[redundant]'} 




1539




 





 





 





 





 





 



 						else { 




1540




0





 





 





 





 





 



 							$opts{'done'}->{$v} = 1; 




1541




 





 





 





 





 





 



 							 




1542




0




  
  0
  




 





 





 





 



 							if ($firstdone) 




 




0





 





 





 





 





 



   




1543




0





 





 





 





 





 



 								{print $fh "\n"} 




1544




 





 





 





 





 





 



 							else 




1545




 





 





 





 





 





 



 								{$firstdone = 1} 




1546




 





 





 





 





 





 



 							 




1547




0





 





 





 





 





 



 							showref($v, %opts, done=>$opts{'done'}, indent=>$indentnum+1, labelself=>1, fh=>$fh) 




1548




 





 





 





 





 





 



 						} 




1549




 





 





 





 





 





 



 					} 




1550




 





 





 





 





 





 



 					else  




1551




 





 





 





 





 





 



 						{print $fh $indent, $tab, $v} 




1552




 





 





 





 





 





 



 				} 




1553




 





 





 





 





 





 



 				 




1554




 





 





 





 





 





 



 				#elsif (defined $v) 




1555




 





 





 





 





 





 



 				#	{print $fh $indent, $tab, $v, "\n"} 




1556




 





 





 





 





 





 



 				#else 




1557




 





 





 





 





 





 



 				#	{print $fh $indent, $tab, "[undef]\n"} 




1558




 





 





 





 





 





 



 				 




1559




 





 





 





 





 





 



 				else { 




1560




0





 





 





 





 





 



 					print $fh $indent, $tab, define_show($v), "\n" 




1561




 





 





 





 





 





 



 				} 




1562




 





 





 





 





 





 



   




1563




 





 





 





 





 





 



 			} 




1564




 





 





 





 





 





 



 		} 




1565




 





 





 





 





 





 



 	} 




1566




 





 





 





 





 





 



 	 




1567




0




  
  0
  




 





 





 





 



 	if (! $indent) 




 




0





 





 





 





 





 



   




1568




 





 





 





 





 





 



 		{print $fh "\\----------------------------------------------------------------------------/\n\n"} 




1569




 





 





 





 





 





 



 	 




1570




0




  
  0
  




 





 





 





 



 	if (inweb()) 




 




0





 





 





 





 





 



   




1571




 





 





 





 





 





 



 		{print $fh "
\n"} 1572             1573 0 0         ismem($fh) and return $fh->mem(); 1574             } 1575             # 1576             # showref 1577             #------------------------------------------------------------------------------ 1578               1579               1580             #------------------------------------------------------------------------------ 1581             # getfh 1582             # 1583             # Private sub. Returns a file handle that is either STDOUT or STDERR (depending 1584             # on the value of the global variable $Debug::ShowStuff::out), or a MemHandle 1585             # object that will be used to return a string to the caller of the function 1586             # that called getfh. 1587             # 1588             sub getfh { 1589 0     0 0   my ($wa) = @_; 1590 0           my ($fh); 1591             1592             # if explicit context 1593 0 0         if ($always_void) 1594 0           { undef $wa } 1595             1596             # if called in void context, outputs to STDOUT, 1597             # otherwise returns string 1598 0 0         if (defined $wa) { 1599 0           require MemHandle; 1600 0           $fh = MemHandle->new(''); 1601             } 1602             1603             else { 1604 0           $fh = $out; 1605             } 1606             1607             # return file handle 1608 0           return $fh; 1609             } 1610             # 1611             # getfh 1612             #------------------------------------------------------------------------------ 1613               1614               1615             #------------------------------------------------------------------------------ 1616             # ismem 1617             # 1618             # This private function returns true if the given file handle 1619             # is a MemHandle filehandle. 1620             # 1621             sub ismem { 1622 0     0 0   return UNIVERSAL::isa($_[0], 'MemHandle'); 1623             } 1624             # 1625             # ismem 1626             #------------------------------------------------------------------------------ 1627               1628               1629             #------------------------------------------------------------------------------ 1630             # spacepad 1631             # 1632             # This private function returns the given string padded with 1633             # the indicated number of spaces. The spaces are added to the right 1634             # 1635             sub spacepad { 1636 0     0 0   my ($str, $width) = @_; 1637 0           return sprintf("%-${width}s", $str); 1638             } 1639             # 1640             # spacepad 1641             #------------------------------------------------------------------------------ 1642               1643               1644             #------------------------------------------------------------------------------ 1645             # longestkey 1646             # 1647             # This private function returns the length of the longest key 1648             # in the given hash. Only pass in hash references, not hashes. 1649             # 1650             sub longestkey { 1651 0     0 0   my ($hash) = @_; 1652 0           my $max = 0; 1653             1654 0           foreach my $key (keys %$hash) { 1655 0 0         if (length($key) > $max) 1656 0           { $max = length($key) } 1657             } 1658             1659 0           return $max; 1660             } 1661             # 1662             # longestkey 1663             #------------------------------------------------------------------------------ 1664               1665               1666             #------------------------------------------------------------------------------ 1667             # asarr 1668             # 1669             # Private function. Allows an optional argument to be passed as 1670             # either an array reference or as a single item. Always returns 1671             # an array reference in scalar context and an array in array context. 1672             # 1673             sub asarr { 1674 0     0 0   my $arg = shift; 1675 0           my @rv; 1676             1677 0 0         if (ref $arg)   0 0           1678 0           {@rv = @$arg} 1679             elsif (defined $arg) 1680             {@rv = $arg} 1681             1682 0 0         wantarray and return @rv; 1683 0           return \@rv; 1684             } 1685             # 1686             # asarr 1687             #------------------------------------------------------------------------------ 1688               1689               1690             #------------------------------------------------------------------------------ 1691             # printhr 1692             # 1693               1694             =head2 printhr 1695               1696             Prints a horizontal rule. Handy for dividing up multiple println's. 1697               1698             In text mode, the horizontal rule is a set of 80 dashes. In 1699             L, the output is either a
element or a

1700             element, depending on the title option (see "title" below). 1701               1702             So, for example, the following line outputs a simple horizontal rule: 1703               1704             B title 1705               1706             If the Coption is sent, the title is embedded in the horizontal rule. </td> </tr> <tr> <td class="h" > <a name="1707">1707</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> So, for example, the following code produces a horizontal rule with with the </td> </tr> <tr> <td class="h" > <a name="1708">1708</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> string "test" embedded in it: </td> </tr> <tr> <td class="h" > <a name="1709">1709</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1710">1710</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> printhr title=>'test'; </td> </tr> <tr> <td class="h" > <a name="1711">1711</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1712">1712</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> If only one param is sent, it is assumed that param is the title. So the' </td> </tr> <tr> <td class="h" > <a name="1713">1713</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> following code produces exactly the same thing as the example above: </td> </tr> <tr> <td class="h" > <a name="1714">1714</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1715">1715</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> printhr 'test'; </td> </tr> <tr> <td class="h" > <a name="1716">1716</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1717">1717</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> In web mode, a title changes the HTML element that is output. If no title is </td> </tr> <tr> <td class="h" > <a name="1718">1718</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> given then printhr outputs an <hr> element. If a title is given the output is </td> </tr> <tr> <td class="h" > <a name="1719">1719</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> C<p> element with the title as the content. The <p> element has a gray </td> </tr> <tr> <td class="h" > <a name="1720">1720</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> background and a black border. </td> </tr> <tr> <td class="h" > <a name="1721">1721</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1722">1722</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> B<option:> dash </td> </tr> <tr> <td class="h" > <a name="1723">1723</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1724">1724</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> If the C<dash>option is sent, the given character is used as the separator. </td> </tr> <tr> <td class="h" > <a name="1725">1725</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> This param only applies to text mode; </td> </tr> <tr> <td class="h" > <a name="1726">1726</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1727">1727</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="1728">1728</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1729">1729</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub printhr { </td> </tr> <tr> <td class="h" > <a name="1730">1730</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#1730-1"> 0 </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#1730-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#1730-1"> 1 </a> </td> <td >   </td> <td class="s"> showstuff() or return ''; </td> </tr> <tr> <td class="h" > <a name="1731">1731</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my (%opts, $title); </td> </tr> <tr> <td class="h" > <a name="1732">1732</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $fh = getfh(wantarray); </td> </tr> <tr> <td class="h" > <a name="1733">1733</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="1734">1734</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # single argument: title </td> </tr> <tr> <td class="h" > <a name="1735">1735</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#1735-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (@_ == 1) { </td> </tr> <tr> <td class="h" > <a name="1736">1736</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $title = $_[0]; </td> </tr> <tr> <td class="h" > <a name="1737">1737</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1738">1738</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else { </td> </tr> <tr> <td class="h" > <a name="1739">1739</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> %opts = @_; </td> </tr> <tr> <td class="h" > <a name="1740">1740</a> </td> <td class="c0" > 0 </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--condition.html#1740-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $title = $opts{'title'} || $opts{'msg'}; </td> </tr> <tr> <td class="h" > <a name="1741">1741</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1742">1742</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="1743">1743</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # web mode </td> </tr> <tr> <td class="h" > <a name="1744">1744</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#1744-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (inweb()) { </td> </tr> <tr> <td class="h" > <a name="1745">1745</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $indent = web_indent(); </td> </tr> <tr> <td class="h" > <a name="1746">1746</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="1747">1747</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#1747-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (defined $title) { </td> </tr> <tr> <td class="h" > <a name="1748">1748</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print $fh <<"(HTML)"; </td> </tr> <tr> <td class="h" > <a name="1749">1749</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> <p </td> </tr> <tr> <td class="h" > <a name="1750">1750</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> style=" </td> </tr> <tr> <td class="h" > <a name="1751">1751</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $indent </td> </tr> <tr> <td class="h" > <a name="1752">1752</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> background-color: #cccccc; </td> </tr> <tr> <td class="h" > <a name="1753">1753</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> border: 1px solid black; </td> </tr> <tr> <td class="h" > <a name="1754">1754</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> color: black; </td> </tr> <tr> <td class="h" > <a name="1755">1755</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> padding: 4px; </td> </tr> <tr> <td class="h" > <a name="1756">1756</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> font-weight: bold; </td> </tr> <tr> <td class="h" > <a name="1757">1757</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> font-size: 8pt; </td> </tr> <tr> <td class="h" > <a name="1758">1758</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> -moz-border-radius: 5px; </td> </tr> <tr> <td class="h" > <a name="1759">1759</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> -webkit-border-radius: 5px; </td> </tr> <tr> <td class="h" > <a name="1760">1760</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> "> </td> </tr> <tr> <td class="h" > <a name="1761">1761</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> @{ [ htmlesc($title) ] } </td> </tr> <tr> <td class="h" > <a name="1762">1762</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </p> </td> </tr> <tr> <td class="h" > <a name="1763">1763</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> (HTML) </td> </tr> <tr> <td class="h" > <a name="1764">1764</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1765">1765</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="1766">1766</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else { </td> </tr> <tr> <td class="h" > <a name="1767">1767</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print $fh qq|<hr style="$indent">\n|; </td> </tr> <tr> <td class="h" > <a name="1768">1768</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1769">1769</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1770">1770</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="1771">1771</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # else text mode </td> </tr> <tr> <td class="h" > <a name="1772">1772</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else { </td> </tr> <tr> <td class="h" > <a name="1773">1773</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # set dash </td> </tr> <tr> <td class="h" > <a name="1774">1774</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $dash = default($opts{'dash'}, '-'); </td> </tr> <tr> <td class="h" > <a name="1775">1775</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="1776">1776</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # add vertical space </td> </tr> <tr> <td class="h" > <a name="1777">1777</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#1777-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($opts{'vspace'}) </td> </tr> <tr> <td class="h" > <a name="1778">1778</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { print "\n" } </td> </tr> <tr> <td class="h" > <a name="1779">1779</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="1780">1780</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> add_indents($fh); </td> </tr> <tr> <td class="h" > <a name="1781">1781</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="1782">1782</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#1782-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (defined $title) { </td> </tr> <tr> <td class="h" > <a name="1783">1783</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print $fh </td> </tr> <tr> <td class="h" > <a name="1784">1784</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ($dash x 3), </td> </tr> <tr> <td class="h" > <a name="1785">1785</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> " $title ", </td> </tr> <tr> <td class="h" > <a name="1786">1786</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ($dash x (75 - length($title))), </td> </tr> <tr> <td class="h" > <a name="1787">1787</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> "\n"; </td> </tr> <tr> <td class="h" > <a name="1788">1788</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1789">1789</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="1790">1790</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else { </td> </tr> <tr> <td class="h" > <a name="1791">1791</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print $fh ($dash x 80), "\n"; </td> </tr> <tr> <td class="h" > <a name="1792">1792</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1793">1793</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1794">1794</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1795">1795</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="1796">1796</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # printhr </td> </tr> <tr> <td class="h" > <a name="1797">1797</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="1798">1798</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1799">1799</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1800">1800</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="1801">1801</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # text_window_size </td> </tr> <tr> <td class="h" > <a name="1802">1802</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="1803">1803</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub text_window_size { </td> </tr> <tr> <td class="h" > <a name="1804">1804</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#1804-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#1804-1"> 0 </a> </td> <td >   </td> <td class="s"> my (@dimensions, %rv); </td> </tr> <tr> <td class="h" > <a name="1805">1805</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="1806">1806</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # load necessary module </td> </tr> <tr> <td class="h" > <a name="1807">1807</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> require Term::ReadKey; </td> </tr> <tr> <td class="h" > <a name="1808">1808</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="1809">1809</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # get sizes </td> </tr> <tr> <td class="h" > <a name="1810">1810</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # ($wchar, $hchar, $wpixels, $hpixels) = GetTerminalSize(); </td> </tr> <tr> <td class="h" > <a name="1811">1811</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> @dimensions = Term::ReadKey::GetTerminalSize(); </td> </tr> <tr> <td class="h" > <a name="1812">1812</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="1813">1813</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # set hash </td> </tr> <tr> <td class="h" > <a name="1814">1814</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $rv{'chars_wide'} = $dimensions[0]; </td> </tr> <tr> <td class="h" > <a name="1815">1815</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $rv{'chars_tall'} = $dimensions[1]; </td> </tr> <tr> <td class="h" > <a name="1816">1816</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $rv{'pixels_wide'} = $dimensions[2]; </td> </tr> <tr> <td class="h" > <a name="1817">1817</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $rv{'pixels_tall'} = $dimensions[3]; </td> </tr> <tr> <td class="h" > <a name="1818">1818</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="1819">1819</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # return </td> </tr> <tr> <td class="h" > <a name="1820">1820</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return \%rv; </td> </tr> <tr> <td class="h" > <a name="1821">1821</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1822">1822</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="1823">1823</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # text_window_size </td> </tr> <tr> <td class="h" > <a name="1824">1824</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="1825">1825</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1826">1826</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1827">1827</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1828">1828</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="1829">1829</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # add_indents </td> </tr> <tr> <td class="h" > <a name="1830">1830</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="1831">1831</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # Private function </td> </tr> <tr> <td class="h" > <a name="1832">1832</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="1833">1833</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub add_indents { </td> </tr> <tr> <td class="h" > <a name="1834">1834</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#1834-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#1834-1"> 0 </a> </td> <td >   </td> <td class="s"> my ($fh) = @_; </td> </tr> <tr> <td class="h" > <a name="1835">1835</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="1836">1836</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> for (1..$indent_level) { </td> </tr> <tr> <td class="h" > <a name="1837">1837</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print $fh $indent_tab; </td> </tr> <tr> <td class="h" > <a name="1838">1838</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1839">1839</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1840">1840</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="1841">1841</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # add_indents </td> </tr> <tr> <td class="h" > <a name="1842">1842</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="1843">1843</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1844">1844</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1845">1845</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="1846">1846</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # printval </td> </tr> <tr> <td class="h" > <a name="1847">1847</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="1848">1848</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # I don't even remember what this function is for, so for now I'm commenting </td> </tr> <tr> <td class="h" > <a name="1849">1849</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # it out. </td> </tr> <tr> <td class="h" > <a name="1850">1850</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="1851">1851</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # sub printval { </td> </tr> <tr> <td class="h" > <a name="1852">1852</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # showstuff() or return ''; </td> </tr> <tr> <td class="h" > <a name="1853">1853</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="1854">1854</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # my ($val) = @_; </td> </tr> <tr> <td class="h" > <a name="1855">1855</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # my $fh = getfh(wantarray); </td> </tr> <tr> <td class="h" > <a name="1856">1856</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="1857">1857</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # # get value to print </td> </tr> <tr> <td class="h" > <a name="1858">1858</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # $val = define_show($val); </td> </tr> <tr> <td class="h" > <a name="1859">1859</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="1860">1860</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # if (inweb()) </td> </tr> <tr> <td class="h" > <a name="1861">1861</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # { $val = htmlesc($val) } </td> </tr> <tr> <td class="h" > <a name="1862">1862</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="1863">1863</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # print $fh $val; </td> </tr> <tr> <td class="h" > <a name="1864">1864</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="1865">1865</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # ismem($fh) and return $fh->mem(); </td> </tr> <tr> <td class="h" > <a name="1866">1866</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # } </td> </tr> <tr> <td class="h" > <a name="1867">1867</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="1868">1868</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # printval </td> </tr> <tr> <td class="h" > <a name="1869">1869</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="1870">1870</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1871">1871</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1872">1872</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="1873">1873</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # preln </td> </tr> <tr> <td class="h" > <a name="1874">1874</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="1875">1875</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1876">1876</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 preln </td> </tr> <tr> <td class="h" > <a name="1877">1877</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1878">1878</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Outputs the given values inside a <pre> element. If not in a web environment, </td> </tr> <tr> <td class="h" > <a name="1879">1879</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> works just like preln. </td> </tr> <tr> <td class="h" > <a name="1880">1880</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1881">1881</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="1882">1882</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1883">1883</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub preln { </td> </tr> <tr> <td class="h" > <a name="1884">1884</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#1884-1"> 0 </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#1884-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#1884-1"> 1 </a> </td> <td >   </td> <td class="s"> showstuff() or return ''; </td> </tr> <tr> <td class="h" > <a name="1885">1885</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="1886">1886</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#1886-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (! inweb()) </td> </tr> <tr> <td class="h" > <a name="1887">1887</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { return println(@_) } </td> </tr> <tr> <td class="h" > <a name="1888">1888</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="1889">1889</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my ($str); </td> </tr> <tr> <td class="h" > <a name="1890">1890</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $fh = getfh(wantarray); </td> </tr> <tr> <td class="h" > <a name="1891">1891</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="1892">1892</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # special case: no inputs </td> </tr> <tr> <td class="h" > <a name="1893">1893</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#1893-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--condition.html#1893-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (! @_ ) </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#-2"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1894">1894</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> {$str = '<i>empty</i>'} </td> </tr> <tr> <td class="h" > <a name="1895">1895</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="1896">1896</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # special case: just one element and it's undefined </td> </tr> <tr> <td class="h" > <a name="1897">1897</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> elsif ( (@_ == 1) && (! defined $_[0]) ) </td> </tr> <tr> <td class="h" > <a name="1898">1898</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> {$str = '<i>undefined</i>'} </td> </tr> <tr> <td class="h" > <a name="1899">1899</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="1900">1900</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # else lump them all together </td> </tr> <tr> <td class="h" > <a name="1901">1901</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else </td> </tr> <tr> <td class="h" > <a name="1902">1902</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> {$str = htmlesc(join('', @_))} </td> </tr> <tr> <td class="h" > <a name="1903">1903</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="1904">1904</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print $fh </td> </tr> <tr> <td class="h" > <a name="1905">1905</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> '<pre style="background-color:white;color:black;text-align:left;border:gray solid 1px;margin:3px;padding:3px; font-size:16px;">', </td> </tr> <tr> <td class="h" > <a name="1906">1906</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $str, </td> </tr> <tr> <td class="h" > <a name="1907">1907</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> "</pre>\n"; </td> </tr> <tr> <td class="h" > <a name="1908">1908</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="1909">1909</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#1909-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ismem($fh) and return $fh->mem(); </td> </tr> <tr> <td class="h" > <a name="1910">1910</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1911">1911</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="1912">1912</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # preln </td> </tr> <tr> <td class="h" > <a name="1913">1913</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="1914">1914</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1915">1915</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1916">1916</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1917">1917</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="1918">1918</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # dieln </td> </tr> <tr> <td class="h" > <a name="1919">1919</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="1920">1920</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1921">1921</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 dieln </td> </tr> <tr> <td class="h" > <a name="1922">1922</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1923">1923</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Works like the C<die> command, except it always adds an end-of-line to the </td> </tr> <tr> <td class="h" > <a name="1924">1924</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> input array so you never get those "at line blah-blah-blah" additions. </td> </tr> <tr> <td class="h" > <a name="1925">1925</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1926">1926</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="1927">1927</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1928">1928</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub dieln { </td> </tr> <tr> <td class="h" > <a name="1929">1929</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#1929-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#1929-1"> 1 </a> </td> <td >   </td> <td class="s"> my ($str); </td> </tr> <tr> <td class="h" > <a name="1930">1930</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $str = join('', map {define_show($_)} @_); </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1931">1931</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="1932">1932</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> die $str . "\n"; </td> </tr> <tr> <td class="h" > <a name="1933">1933</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1934">1934</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="1935">1935</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # dieln </td> </tr> <tr> <td class="h" > <a name="1936">1936</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="1937">1937</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1938">1938</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1939">1939</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="1940">1940</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # devexit </td> </tr> <tr> <td class="h" > <a name="1941">1941</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="1942">1942</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1943">1943</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 devexit </td> </tr> <tr> <td class="h" > <a name="1944">1944</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1945">1945</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Works like C<dieln> except it prepends 'dev exit: ' to the end of the string. </td> </tr> <tr> <td class="h" > <a name="1946">1946</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> If no string is sent, just outputs "dev exit". </td> </tr> <tr> <td class="h" > <a name="1947">1947</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1948">1948</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="1949">1949</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1950">1950</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub devexit { </td> </tr> <tr> <td class="h" > <a name="1951">1951</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#1951-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#1951-1"> 1 </a> </td> <td >   </td> <td class="s"> my (@str) = @_; </td> </tr> <tr> <td class="h" > <a name="1952">1952</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my ($rv); </td> </tr> <tr> <td class="h" > <a name="1953">1953</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="1954">1954</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#1954-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (defined $str[0]) </td> </tr> <tr> <td class="h" > <a name="1955">1955</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { $rv = 'dev exit: ' . join('', @str) } </td> </tr> <tr> <td class="h" > <a name="1956">1956</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else </td> </tr> <tr> <td class="h" > <a name="1957">1957</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { $rv = 'dev exit' } </td> </tr> <tr> <td class="h" > <a name="1958">1958</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="1959">1959</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # exit in web, die in commandline </td> </tr> <tr> <td class="h" > <a name="1960">1960</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#1960-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ( inweb(strict=>1) ) { </td> </tr> <tr> <td class="h" > <a name="1961">1961</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> println $rv; </td> </tr> <tr> <td class="h" > <a name="1962">1962</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> exit; </td> </tr> <tr> <td class="h" > <a name="1963">1963</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1964">1964</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else { </td> </tr> <tr> <td class="h" > <a name="1965">1965</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> dieln $rv; </td> </tr> <tr> <td class="h" > <a name="1966">1966</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1967">1967</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1968">1968</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="1969">1969</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # devexit </td> </tr> <tr> <td class="h" > <a name="1970">1970</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="1971">1971</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1972">1972</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1973">1973</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="1974">1974</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # diearr </td> </tr> <tr> <td class="h" > <a name="1975">1975</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="1976">1976</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1977">1977</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 diearr </td> </tr> <tr> <td class="h" > <a name="1978">1978</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1979">1979</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Displays an array, then dies using C<dieln>. </td> </tr> <tr> <td class="h" > <a name="1980">1980</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1981">1981</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="1982">1982</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1983">1983</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub diearr { </td> </tr> <tr> <td class="h" > <a name="1984">1984</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#1984-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#1984-1"> 1 </a> </td> <td >   </td> <td class="s"> my $err = shift; </td> </tr> <tr> <td class="h" > <a name="1985">1985</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> showarr @_; </td> </tr> <tr> <td class="h" > <a name="1986">1986</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> dieln $err; </td> </tr> <tr> <td class="h" > <a name="1987">1987</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="1988">1988</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="1989">1989</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # diearr </td> </tr> <tr> <td class="h" > <a name="1990">1990</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="1991">1991</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1992">1992</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1993">1993</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="1994">1994</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # pressenter </td> </tr> <tr> <td class="h" > <a name="1995">1995</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="1996">1996</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1997">1997</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 pressenter </td> </tr> <tr> <td class="h" > <a name="1998">1998</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1999">1999</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> For use at the command line. Outputs a prompt to "press enter to continue", </td> </tr> <tr> <td class="h" > <a name="2000">2000</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> then waits for you to do exactly that. </td> </tr> <tr> <td class="h" > <a name="2001">2001</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2002">2002</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="2003">2003</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2004">2004</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub pressenter { </td> </tr> <tr> <td class="h" > <a name="2005">2005</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2005-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2005-1"> 1 </a> </td> <td >   </td> <td class="s"> my ($msg) = @_; </td> </tr> <tr> <td class="h" > <a name="2006">2006</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my ($fh); </td> </tr> <tr> <td class="h" > <a name="2007">2007</a> </td> <td class="c0" > 0 </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--condition.html#2007-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $msg ||= 'press enter to continue'; </td> </tr> <tr> <td class="h" > <a name="2008">2008</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $msg =~ s|\s*$||s; </td> </tr> <tr> <td class="h" > <a name="2009">2009</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2010">2010</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # load IO::Handle </td> </tr> <tr> <td class="h" > <a name="2011">2011</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> require IO::Handle; </td> </tr> <tr> <td class="h" > <a name="2012">2012</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2013">2013</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # output message </td> </tr> <tr> <td class="h" > <a name="2014">2014</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> println $msg; </td> </tr> <tr> <td class="h" > <a name="2015">2015</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2016">2016</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # flush output file handle </td> </tr> <tr> <td class="h" > <a name="2017">2017</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $fh = getfh(wantarray); </td> </tr> <tr> <td class="h" > <a name="2018">2018</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $fh->flush(); </td> </tr> <tr> <td class="h" > <a name="2019">2019</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2020">2020</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # wait </td> </tr> <tr> <td class="h" > <a name="2021">2021</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> <STDIN>; </td> </tr> <tr> <td class="h" > <a name="2022">2022</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2023">2023</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2024">2024</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # pressenter </td> </tr> <tr> <td class="h" > <a name="2025">2025</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2026">2026</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2027">2027</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2028">2028</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2029">2029</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # confirm </td> </tr> <tr> <td class="h" > <a name="2030">2030</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2031">2031</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2032">2032</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 confirm </td> </tr> <tr> <td class="h" > <a name="2033">2033</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2034">2034</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Prompts the user for a y or n. Exits quietly if y is pressed. </td> </tr> <tr> <td class="h" > <a name="2035">2035</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2036">2036</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="2037">2037</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2038">2038</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub confirm { </td> </tr> <tr> <td class="h" > <a name="2039">2039</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2039-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2039-1"> 1 </a> </td> <td >   </td> <td class="s"> my ($msg) = @_; </td> </tr> <tr> <td class="h" > <a name="2040">2040</a> </td> <td class="c0" > 0 </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--condition.html#2040-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $msg ||= 'continue?'; </td> </tr> <tr> <td class="h" > <a name="2041">2041</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $msg =~ s|\s*$| |s; </td> </tr> <tr> <td class="h" > <a name="2042">2042</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2043">2043</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> RESPONSELOOP: </td> </tr> <tr> <td class="h" > <a name="2044">2044</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> while (1) { </td> </tr> <tr> <td class="h" > <a name="2045">2045</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my ($response); </td> </tr> <tr> <td class="h" > <a name="2046">2046</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2047">2047</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print $msg; </td> </tr> <tr> <td class="h" > <a name="2048">2048</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $response = <STDIN>; </td> </tr> <tr> <td class="h" > <a name="2049">2049</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $response =~ s|^\s*(.).*|$1|s; </td> </tr> <tr> <td class="h" > <a name="2050">2050</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $response = lc($response); </td> </tr> <tr> <td class="h" > <a name="2051">2051</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2052">2052</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2052-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($response eq 'y') </td> </tr> <tr> <td class="h" > <a > </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#-2"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2053">2053</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { return 1 } </td> </tr> <tr> <td class="h" > <a name="2054">2054</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> elsif ($response eq 'n') </td> </tr> <tr> <td class="h" > <a name="2055">2055</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { exit } </td> </tr> <tr> <td class="h" > <a name="2056">2056</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2057">2057</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2058">2058</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2059">2059</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # confirm </td> </tr> <tr> <td class="h" > <a name="2060">2060</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2061">2061</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2062">2062</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2063">2063</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2064">2064</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # httpheader </td> </tr> <tr> <td class="h" > <a name="2065">2065</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2066">2066</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2067">2067</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 httpheader </td> </tr> <tr> <td class="h" > <a name="2068">2068</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2069">2069</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Outputs a text/html HTTP header. Not useful if you're using mod_perl. </td> </tr> <tr> <td class="h" > <a name="2070">2070</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2071">2071</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="2072">2072</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2073">2073</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub httpheader { </td> </tr> <tr> <td class="h" > <a name="2074">2074</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2074-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2074-1"> 1 </a> </td> <td >   </td> <td class="s"> my (%opts) = @_; </td> </tr> <tr> <td class="h" > <a name="2075">2075</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2076">2076</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2076-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (wantarray) </td> </tr> <tr> <td class="h" > <a name="2077">2077</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> {return "Content-type:text/html\n\n"} </td> </tr> <tr> <td class="h" > <a name="2078">2078</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2079">2079</a> </td> <td class="c0" > 0 </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--condition.html#2079-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $fh = $opts{'fh'} || getfh(wantarray); </td> </tr> <tr> <td class="h" > <a name="2080">2080</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print $fh "Content-type:text/html\n\n"; </td> </tr> <tr> <td class="h" > <a name="2081">2081</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2082">2082</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2083">2083</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2083-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2083-1"> 0 </a> </td> <td >   </td> <td class="s"> sub httpheaders{return httpheader(@_)} </td> </tr> <tr> <td class="h" > <a name="2084">2084</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2085">2085</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # header </td> </tr> <tr> <td class="h" > <a name="2086">2086</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2087">2087</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2088">2088</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2089">2089</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2090">2090</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2091">2091</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # showstderr </td> </tr> <tr> <td class="h" > <a name="2092">2092</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2093">2093</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2094">2094</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 showstderr </td> </tr> <tr> <td class="h" > <a name="2095">2095</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2096">2096</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> This function allows you to see, in the web page produced by a CGI, everything </td> </tr> <tr> <td class="h" > <a name="2097">2097</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> the CGI output to STDERR. </td> </tr> <tr> <td class="h" > <a name="2098">2098</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2099">2099</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> To use C<showstderr>, assign the return value of the function to a variable </td> </tr> <tr> <td class="h" > <a name="2100">2100</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> that is scoped to the entire CGI script: </td> </tr> <tr> <td class="h" > <a name="2101">2101</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2102">2102</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $stderr = showstderr(); </td> </tr> <tr> <td class="h" > <a name="2103">2103</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2104">2104</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> You need not do anything more with that variable. The object reference by </td> </tr> <tr> <td class="h" > <a name="2105">2105</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> your variable holds on to everything output to both STDOUT and STDERR. When </td> </tr> <tr> <td class="h" > <a name="2106">2106</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> the variable goes out of scope, the object outputs the STDOUT content with the </td> </tr> <tr> <td class="h" > <a name="2107">2107</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> STDERR content at the top of the web page. </td> </tr> <tr> <td class="h" > <a name="2108">2108</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2109">2109</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="2110">2110</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2111">2111</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub showstderr { </td> </tr> <tr> <td class="h" > <a name="2112">2112</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2112-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2112-1"> 1 </a> </td> <td >   </td> <td class="s"> return Debug::ShowStuff::ShowStdErr->new(@_); </td> </tr> <tr> <td class="h" > <a name="2113">2113</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2114">2114</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2115">2115</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # showstderr </td> </tr> <tr> <td class="h" > <a name="2116">2116</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2117">2117</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2118">2118</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2119">2119</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2120">2120</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2121">2121</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # forceenv </td> </tr> <tr> <td class="h" > <a name="2122">2122</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2123">2123</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2124">2124</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 forcetext, forceweb, forcenone </td> </tr> <tr> <td class="h" > <a name="2125">2125</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2126">2126</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> By default, Debug::Showstuff guesses if it should be in </td> </tr> <tr> <td class="h" > <a name="2127">2127</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> L<text or web mode|/"Text and web modes">. These functions are for when you </td> </tr> <tr> <td class="h" > <a name="2128">2128</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> want to explicitly tell Debug::ShowStuff what mode it should be in. </td> </tr> <tr> <td class="h" > <a name="2129">2129</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> C<forcetext> forces text mode. C<forceweb> forces web mode. C<forcenone> </td> </tr> <tr> <td class="h" > <a name="2130">2130</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> tells Debug::Showstuff that you don't want to force either mode. </td> </tr> <tr> <td class="h" > <a name="2131">2131</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2132">2132</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="2133">2133</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2134">2134</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub forcetext { </td> </tr> <tr> <td class="h" > <a name="2135">2135</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2135-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2135-1"> 1 </a> </td> <td >   </td> <td class="s"> forceenv(0); </td> </tr> <tr> <td class="h" > <a name="2136">2136</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2137">2137</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2138">2138</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub forceweb { </td> </tr> <tr> <td class="h" > <a name="2139">2139</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2139-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2139-1"> 1 </a> </td> <td >   </td> <td class="s"> forceenv(1); </td> </tr> <tr> <td class="h" > <a name="2140">2140</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2141">2141</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2142">2142</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub forcenone { </td> </tr> <tr> <td class="h" > <a name="2143">2143</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2143-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2143-1"> 1 </a> </td> <td >   </td> <td class="s"> forceenv(undef); </td> </tr> <tr> <td class="h" > <a name="2144">2144</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2145">2145</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2146">2146</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub forceenv { </td> </tr> <tr> <td class="h" > <a name="2147">2147</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2147-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2147-1"> 0 </a> </td> <td >   </td> <td class="s"> $forceweb = $_[0]; </td> </tr> <tr> <td class="h" > <a name="2148">2148</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2149">2149</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2150">2150</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2151">2151</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # forceenv </td> </tr> <tr> <td class="h" > <a name="2152">2152</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2153">2153</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2154">2154</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2155">2155</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2156">2156</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # inweb </td> </tr> <tr> <td class="h" > <a name="2157">2157</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2158">2158</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2159">2159</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 inweb </td> </tr> <tr> <td class="h" > <a name="2160">2160</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2161">2161</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Returns a guess on if we're in a L<web environment|/"Text and web modes">. The </td> </tr> <tr> <td class="h" > <a name="2162">2162</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> guess is pretty simple: if the environment variable C<REQUEST_URI> is true (in </td> </tr> <tr> <td class="h" > <a name="2163">2163</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> the Perlish sense) then this function returns true. </td> </tr> <tr> <td class="h" > <a name="2164">2164</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2165">2165</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> If the global C<$Debug::ShowStuff::forceenv> is defined, this function returns </td> </tr> <tr> <td class="h" > <a name="2166">2166</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> the value of C<$Debug::ShowStuff::forceenv>. </td> </tr> <tr> <td class="h" > <a name="2167">2167</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2168">2168</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="2169">2169</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2170">2170</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub inweb { </td> </tr> <tr> <td class="h" > <a name="2171">2171</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2171-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2171-1"> 1 </a> </td> <td >   </td> <td class="s"> my (%opts) = @_; </td> </tr> <tr> <td class="h" > <a name="2172">2172</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2173">2173</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2173-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> unless ($opts{'strict'}) { </td> </tr> <tr> <td class="h" > <a name="2174">2174</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2174-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (defined $forceweb) </td> </tr> <tr> <td class="h" > <a name="2175">2175</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { return $forceweb } </td> </tr> <tr> <td class="h" > <a name="2176">2176</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2177">2177</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2178">2178</a> </td> <td class="c0" > 0 </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--condition.html#2178-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return ($ENV{'REQUEST_URI'} || $ENV{'SERVER_NAME'}); </td> </tr> <tr> <td class="h" > <a name="2179">2179</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2180">2180</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2181">2181</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # inweb </td> </tr> <tr> <td class="h" > <a name="2182">2182</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2183">2183</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2184">2184</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2185">2185</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2186">2186</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2187">2187</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2188">2188</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # output_to_file </td> </tr> <tr> <td class="h" > <a name="2189">2189</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2190">2190</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2191">2191</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 output_to_file($path) </td> </tr> <tr> <td class="h" > <a name="2192">2192</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2193">2193</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Sends Debug::ShowStuff output to a file instead of to STDOUT or STDERR. The </td> </tr> <tr> <td class="h" > <a name="2194">2194</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> value of this function must be assigned to a variable or it has no effect. </td> </tr> <tr> <td class="h" > <a name="2195">2195</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Don't do anything with the returned value... it is NOT a file handle. The </td> </tr> <tr> <td class="h" > <a name="2196">2196</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> returned value is an object that, when it goes out of scope, closes the output </td> </tr> <tr> <td class="h" > <a name="2197">2197</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> file handle. </td> </tr> <tr> <td class="h" > <a name="2198">2198</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2199">2199</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> For example, the following code will output to three files names </td> </tr> <tr> <td class="h" > <a name="2200">2200</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Larry.txt, Curly.txt, and Moe.txt: </td> </tr> <tr> <td class="h" > <a name="2201">2201</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2202">2202</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> foreach my $name (qw[Larry Curyl Moe]) { </td> </tr> <tr> <td class="h" > <a name="2203">2203</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $output = output_to_file("$name.txt"); </td> </tr> <tr> <td class="h" > <a name="2204">2204</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> println $name; </td> </tr> <tr> <td class="h" > <a name="2205">2205</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> println 'length: ', length($name); </td> </tr> <tr> <td class="h" > <a name="2206">2206</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2207">2207</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2208">2208</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="2209">2209</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2210">2210</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub output_to_file { </td> </tr> <tr> <td class="h" > <a name="2211">2211</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2211-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2211-1"> 1 </a> </td> <td >   </td> <td class="s"> my ($path, %opts) = @_; </td> </tr> <tr> <td class="h" > <a name="2212">2212</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my ($fh, $arrows, $closer); </td> </tr> <tr> <td class="h" > <a name="2213">2213</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2214">2214</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2214-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (! defined wantarray) { </td> </tr> <tr> <td class="h" > <a name="2215">2215</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $msg = </td> </tr> <tr> <td class="h" > <a name="2216">2216</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> "Do not call outputfile in void context. Save the return value to a scalar.\n" . </td> </tr> <tr> <td class="h" > <a name="2217">2217</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> "REMINDER: The return value is NOT a filehandle, it is just an object that, when\n" . </td> </tr> <tr> <td class="h" > <a name="2218">2218</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> "it goes out of scope, closes the global filehandle.\n"; </td> </tr> <tr> <td class="h" > <a name="2219">2219</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2220">2220</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> croak $msg; </td> </tr> <tr> <td class="h" > <a name="2221">2221</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2222">2222</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2223">2223</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # if path is a reference, assume it's a filehandle object </td> </tr> <tr> <td class="h" > <a name="2224">2224</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2224-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (ref $path) { </td> </tr> <tr> <td class="h" > <a name="2225">2225</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $fh = $path; </td> </tr> <tr> <td class="h" > <a name="2226">2226</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2227">2227</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2228">2228</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # else open filehandle to path </td> </tr> <tr> <td class="h" > <a name="2229">2229</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else { </td> </tr> <tr> <td class="h" > <a name="2230">2230</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> require FileHandle; </td> </tr> <tr> <td class="h" > <a name="2231">2231</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2232">2232</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # open new or open append </td> </tr> <tr> <td class="h" > <a name="2233">2233</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2233-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($opts{'append'}) </td> </tr> <tr> <td class="h" > <a name="2234">2234</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { $arrows = '>>' } </td> </tr> <tr> <td class="h" > <a name="2235">2235</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else </td> </tr> <tr> <td class="h" > <a name="2236">2236</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { $arrows = '>' } </td> </tr> <tr> <td class="h" > <a name="2237">2237</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2238">2238</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $fh = FileHandle->new("$arrows$path"); </td> </tr> <tr> <td class="h" > <a name="2239">2239</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $fh->autoflush(1); </td> </tr> <tr> <td class="h" > <a name="2240">2240</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2241">2241</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2242">2242</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> setoutput($fh); </td> </tr> <tr> <td class="h" > <a name="2243">2243</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2244">2244</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $closer = Debug::ShowStuff::CloseGlobalHandle->new($fh); </td> </tr> <tr> <td class="h" > <a name="2245">2245</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return $closer; </td> </tr> <tr> <td class="h" > <a name="2246">2246</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2247">2247</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2248">2248</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # output_to_file </td> </tr> <tr> <td class="h" > <a name="2249">2249</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2250">2250</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2251">2251</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2252">2252</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2253">2253</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2254">2254</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # setoutput </td> </tr> <tr> <td class="h" > <a name="2255">2255</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2256">2256</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2257">2257</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 setoutput </td> </tr> <tr> <td class="h" > <a name="2258">2258</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2259">2259</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Sets the default output handle. By default, routines in C<Debug::ShowStuff> </td> </tr> <tr> <td class="h" > <a name="2260">2260</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> output to STDOUT. With this command you can set the default output to STDERR, </td> </tr> <tr> <td class="h" > <a name="2261">2261</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> back to STDOUT, to a filehandle you specify, or to a </td> </tr> <tr> <td class="h" > <a name="2262">2262</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Debug::ShowStuff::SeparatePrint file handle. </td> </tr> <tr> <td class="h" > <a name="2263">2263</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2264">2264</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> The following command sets default output to STDERR: </td> </tr> <tr> <td class="h" > <a name="2265">2265</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2266">2266</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> setoutput 'stderr'; </td> </tr> <tr> <td class="h" > <a name="2267">2267</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2268">2268</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> This command sets output back to STDOUT: </td> </tr> <tr> <td class="h" > <a name="2269">2269</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2270">2270</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> setoutput 'stdout'; </td> </tr> <tr> <td class="h" > <a name="2271">2271</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2272">2272</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> This command sends output to a file handle of your choice: </td> </tr> <tr> <td class="h" > <a name="2273">2273</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2274">2274</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> setoutput $fh; </td> </tr> <tr> <td class="h" > <a name="2275">2275</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2276">2276</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> This command sends output to a Debug::ShowStuff::SeparatePrint file handle. </td> </tr> <tr> <td class="h" > <a name="2277">2277</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> This option is a good way to create a simple log file. When you print to this </td> </tr> <tr> <td class="h" > <a name="2278">2278</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> type of file handle, the file is opened separately just for that write, an </td> </tr> <tr> <td class="h" > <a name="2279">2279</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> exclusive lock on the file is obtained, and the end of the file is sought. </td> </tr> <tr> <td class="h" > <a name="2280">2280</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2281">2281</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Note that the next parameter must be the path to the output file: </td> </tr> <tr> <td class="h" > <a name="2282">2282</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2283">2283</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> setoutput 'separateprint', $file_path; </td> </tr> <tr> <td class="h" > <a name="2284">2284</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2285">2285</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> B<option:> new </td> </tr> <tr> <td class="h" > <a name="2286">2286</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2287">2287</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> If the C<new> parameter is true, then the output file is open in non-append </td> </tr> <tr> <td class="h" > <a name="2288">2288</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> mode, which means any existing contents are removed. </td> </tr> <tr> <td class="h" > <a name="2289">2289</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2290">2290</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="2291">2291</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2292">2292</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub setoutput { </td> </tr> <tr> <td class="h" > <a name="2293">2293</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2293-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2293-1"> 1 </a> </td> <td >   </td> <td class="s"> my $outname = shift; </td> </tr> <tr> <td class="h" > <a name="2294">2294</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2295">2295</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # if reference, assume it's filehandle </td> </tr> <tr> <td class="h" > <a name="2296">2296</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # if ( UNIVERSAL::isa($outname, 'FileHandle') ) { </td> </tr> <tr> <td class="h" > <a name="2297">2297</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2297-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ( ref $outname ) { </td> </tr> <tr> <td class="h" > <a > </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#-2"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#-3"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#-4"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2298">2298</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $out = $outname; </td> </tr> <tr> <td class="h" > <a name="2299">2299</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $forceweb = 0; </td> </tr> <tr> <td class="h" > <a name="2300">2300</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2301">2301</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2302">2302</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # STDOUT </td> </tr> <tr> <td class="h" > <a name="2303">2303</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> elsif (lc($outname) eq 'stdout') { </td> </tr> <tr> <td class="h" > <a name="2304">2304</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $out = *STDOUT; </td> </tr> <tr> <td class="h" > <a name="2305">2305</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2306">2306</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2307">2307</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # STDERR </td> </tr> <tr> <td class="h" > <a name="2308">2308</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> elsif (lc($outname) eq 'stderr') { </td> </tr> <tr> <td class="h" > <a name="2309">2309</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $out = *STDERR; </td> </tr> <tr> <td class="h" > <a name="2310">2310</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $forceweb = 0; </td> </tr> <tr> <td class="h" > <a name="2311">2311</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2312">2312</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2313">2313</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # Debug::ShowStuff::SeparatePrint </td> </tr> <tr> <td class="h" > <a name="2314">2314</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> elsif (lc($outname) eq 'separateprint') { </td> </tr> <tr> <td class="h" > <a name="2315">2315</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $out = Debug::ShowStuff::SeparatePrint->new(@_); </td> </tr> <tr> <td class="h" > <a name="2316">2316</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2317">2317</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2318">2318</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # else don't know </td> </tr> <tr> <td class="h" > <a name="2319">2319</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else { </td> </tr> <tr> <td class="h" > <a name="2320">2320</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> croak "do not know this type of output: $outname"; </td> </tr> <tr> <td class="h" > <a name="2321">2321</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2322">2322</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2323">2323</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2324">2324</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # setoutput </td> </tr> <tr> <td class="h" > <a name="2325">2325</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2326">2326</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2327">2327</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2328">2328</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2329">2329</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2330">2330</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # fixundef </td> </tr> <tr> <td class="h" > <a name="2331">2331</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2332">2332</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2333">2333</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 fixundef </td> </tr> <tr> <td class="h" > <a name="2334">2334</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2335">2335</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Takes a single argument. If that argument is undefined, returns an </td> </tr> <tr> <td class="h" > <a name="2336">2336</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> empty string. Otherwise returns the argument exactly as it is. </td> </tr> <tr> <td class="h" > <a name="2337">2337</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2338">2338</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="2339">2339</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2340">2340</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub fixundef { </td> </tr> <tr> <td class="h" > <a name="2341">2341</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2341-1"> 0 </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2341-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2341-1"> 1 </a> </td> <td >   </td> <td class="s"> defined($_[0]) or return ''; </td> </tr> <tr> <td class="h" > <a name="2342">2342</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return $_[0]; </td> </tr> <tr> <td class="h" > <a name="2343">2343</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2344">2344</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2345">2345</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # fixundef </td> </tr> <tr> <td class="h" > <a name="2346">2346</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2347">2347</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2348">2348</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2349">2349</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2350">2350</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # findininc </td> </tr> <tr> <td class="h" > <a name="2351">2351</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2352">2352</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2353">2353</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 findininc </td> </tr> <tr> <td class="h" > <a name="2354">2354</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2355">2355</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Given one or more file names, searches @INC for where they are located. </td> </tr> <tr> <td class="h" > <a name="2356">2356</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Returns an array of full file names. </td> </tr> <tr> <td class="h" > <a name="2357">2357</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2358">2358</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="2359">2359</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2360">2360</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub findininc { </td> </tr> <tr> <td class="h" > <a name="2361">2361</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2361-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2361-1"> 1 </a> </td> <td >   </td> <td class="s"> my (@filenames) = @_; </td> </tr> <tr> <td class="h" > <a name="2362">2362</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my (@rv); </td> </tr> <tr> <td class="h" > <a name="2363">2363</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2364">2364</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> foreach my $dir (@INC) { </td> </tr> <tr> <td class="h" > <a name="2365">2365</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> foreach my $filename (@filenames) { </td> </tr> <tr> <td class="h" > <a name="2366">2366</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $path = "$dir/$filename"; </td> </tr> <tr> <td class="h" > <a name="2367">2367</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2368">2368</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2368-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (-e $path) </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2369">2369</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> {push @rv, $path} </td> </tr> <tr> <td class="h" > <a name="2370">2370</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2371">2371</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2372">2372</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2373">2373</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2373-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (! defined(wantarray)) </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2374">2374</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> {showarr @rv} </td> </tr> <tr> <td class="h" > <a name="2375">2375</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else </td> </tr> <tr> <td class="h" > <a name="2376">2376</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> {return @rv} </td> </tr> <tr> <td class="h" > <a name="2377">2377</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2378">2378</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2379">2379</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # findininc </td> </tr> <tr> <td class="h" > <a name="2380">2380</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2381">2381</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2382">2382</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2383">2383</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2384">2384</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # define_show </td> </tr> <tr> <td class="h" > <a name="2385">2385</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2386">2386</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # Private function. If the given value is undef, returns the string "[undef]". </td> </tr> <tr> <td class="h" > <a name="2387">2387</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # If it is an empty string, returns "[empty string]". Otherwise the original </td> </tr> <tr> <td class="h" > <a name="2388">2388</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # string is returned. </td> </tr> <tr> <td class="h" > <a name="2389">2389</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2390">2390</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2390-1"> 1 </a> </td> <td >   </td> <td > 10 </td> <td class="s"> use overload; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 2 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 6 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2391">2391</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2392">2392</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub define_show { </td> </tr> <tr> <td class="h" > <a name="2393">2393</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2393-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2393-1"> 0 </a> </td> <td >   </td> <td class="s"> my ($val) = @_; </td> </tr> <tr> <td class="h" > <a name="2394">2394</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2395">2395</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # if overloaded object, get return value and </td> </tr> <tr> <td class="h" > <a name="2396">2396</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # concatenate with string (which defines it). </td> </tr> <tr> <td class="h" > <a name="2397">2397</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2397-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (ref $val) { </td> </tr> <tr> <td class="h" > <a name="2398">2398</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2398-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (my $func = overload::Method($val, '""')) </td> </tr> <tr> <td class="h" > <a name="2399">2399</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { $val = &$func($val) } </td> </tr> <tr> <td class="h" > <a name="2400">2400</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2401">2401</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2402">2402</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2402-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (defined $val) { </td> </tr> <tr> <td class="h" > <a name="2403">2403</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2403-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($val eq '') </td> </tr> <tr> <td class="h" > <a name="2404">2404</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { $val = '[empty string]' } </td> </tr> <tr> <td class="h" > <a name="2405">2405</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #elsif ($val =~ m|^\s+$|s) </td> </tr> <tr> <td class="h" > <a name="2406">2406</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # { $val = '[space-only string]' } </td> </tr> <tr> <td class="h" > <a name="2407">2407</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2408">2408</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2409">2409</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else { </td> </tr> <tr> <td class="h" > <a name="2410">2410</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $val = '[undef]'; </td> </tr> <tr> <td class="h" > <a name="2411">2411</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2412">2412</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2413">2413</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return $val; </td> </tr> <tr> <td class="h" > <a name="2414">2414</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2415">2415</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2416">2416</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # define_show </td> </tr> <tr> <td class="h" > <a name="2417">2417</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2418">2418</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2419">2419</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2420">2420</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2421">2421</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # showtainted </td> </tr> <tr> <td class="h" > <a name="2422">2422</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2423">2423</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2424">2424</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 showtainted(@values) </td> </tr> <tr> <td class="h" > <a name="2425">2425</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2426">2426</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Given an array of values, shows which are tainted and which are not. If the </td> </tr> <tr> <td class="h" > <a name="2427">2427</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> first argument is a hashref, displays the tainted status of each element value. </td> </tr> <tr> <td class="h" > <a name="2428">2428</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2429">2429</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="2430">2430</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2431">2431</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub showtainted { </td> </tr> <tr> <td class="h" > <a name="2432">2432</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2432-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2432-1"> 1 </a> </td> <td >   </td> <td class="s"> my (@vals) = @_; </td> </tr> <tr> <td class="h" > <a name="2433">2433</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # require Taint; </td> </tr> <tr> <td class="h" > <a name="2434">2434</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> require Scalar::Util; </td> </tr> <tr> <td class="h" > <a name="2435">2435</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2436">2436</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # if first value is a hashref, show as hash </td> </tr> <tr> <td class="h" > <a name="2437">2437</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2437-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (UNIVERSAL::isa $vals[0], 'HASH') { </td> </tr> <tr> <td class="h" > <a name="2438">2438</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $hashref = $vals[0]; </td> </tr> <tr> <td class="h" > <a name="2439">2439</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $show = {}; </td> </tr> <tr> <td class="h" > <a name="2440">2440</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2441">2441</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> while ( my($key, $val) = each(%$hashref) ) { </td> </tr> <tr> <td class="h" > <a name="2442">2442</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my ($tainted); </td> </tr> <tr> <td class="h" > <a name="2443">2443</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2444">2444</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2444-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (Scalar::Util::tainted($val)) </td> </tr> <tr> <td class="h" > <a name="2445">2445</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { $tainted = 'tainted' } </td> </tr> <tr> <td class="h" > <a name="2446">2446</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else </td> </tr> <tr> <td class="h" > <a name="2447">2447</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { $tainted = 'not tainted' } </td> </tr> <tr> <td class="h" > <a name="2448">2448</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2449">2449</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $show->{$key} = $tainted; </td> </tr> <tr> <td class="h" > <a name="2450">2450</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2451">2451</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2452">2452</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> showhash $show; </td> </tr> <tr> <td class="h" > <a name="2453">2453</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2454">2454</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2455">2455</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # loop through values </td> </tr> <tr> <td class="h" > <a name="2456">2456</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else { </td> </tr> <tr> <td class="h" > <a name="2457">2457</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> foreach my $val (@vals) { </td> </tr> <tr> <td class="h" > <a name="2458">2458</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my ($tainted); </td> </tr> <tr> <td class="h" > <a name="2459">2459</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2460">2460</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2460-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (Scalar::Util::tainted($val)) </td> </tr> <tr> <td class="h" > <a name="2461">2461</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { $tainted = 'tainted: ' } </td> </tr> <tr> <td class="h" > <a name="2462">2462</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else </td> </tr> <tr> <td class="h" > <a name="2463">2463</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { $tainted = 'not tainted: ' } </td> </tr> <tr> <td class="h" > <a name="2464">2464</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2465">2465</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $val = "$tainted$val"; </td> </tr> <tr> <td class="h" > <a name="2466">2466</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2467">2467</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # show values </td> </tr> <tr> <td class="h" > <a name="2468">2468</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> showarr @vals; </td> </tr> <tr> <td class="h" > <a name="2469">2469</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2470">2470</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2471">2471</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2472">2472</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # showtainted </td> </tr> <tr> <td class="h" > <a name="2473">2473</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2474">2474</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2475">2475</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2476">2476</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2477">2477</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # showsth </td> </tr> <tr> <td class="h" > <a name="2478">2478</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2479">2479</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2480">2480</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 showsth </td> </tr> <tr> <td class="h" > <a name="2481">2481</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2482">2482</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Outputs a table of all rows in the given DBI statement handle. Note that </td> </tr> <tr> <td class="h" > <a name="2483">2483</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> this function "uses up" the statement handle. </td> </tr> <tr> <td class="h" > <a name="2484">2484</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2485">2485</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="2486">2486</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2487">2487</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub showsth { </td> </tr> <tr> <td class="h" > <a name="2488">2488</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2488-1"> 0 </a> </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2488-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2488-1"> 1 </a> </td> <td >   </td> <td class="s"> showstuff() or return ''; </td> </tr> <tr> <td class="h" > <a name="2489">2489</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2490">2490</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2490-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (inweb()) </td> </tr> <tr> <td class="h" > <a name="2491">2491</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { return showsth_web(@_) } </td> </tr> <tr> <td class="h" > <a name="2492">2492</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else </td> </tr> <tr> <td class="h" > <a name="2493">2493</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { return showsth_text(@_) } </td> </tr> <tr> <td class="h" > <a name="2494">2494</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2495">2495</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2496">2496</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # showsth </td> </tr> <tr> <td class="h" > <a name="2497">2497</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2498">2498</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2499">2499</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2500">2500</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2501">2501</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # showsql </td> </tr> <tr> <td class="h" > <a name="2502">2502</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2503">2503</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2504">2504</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 showsql </td> </tr> <tr> <td class="h" > <a name="2505">2505</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2506">2506</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> showsql output the results of an SQL statement. showsql takes three </td> </tr> <tr> <td class="h" > <a name="2507">2507</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> parameters: the database handle, the SQL statement, and an array-ref of </td> </tr> <tr> <td class="h" > <a name="2508">2508</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> parameters for the SQL statement. </td> </tr> <tr> <td class="h" > <a name="2509">2509</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2510">2510</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="2511">2511</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2512">2512</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub showsql { </td> </tr> <tr> <td class="h" > <a name="2513">2513</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2513-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2513-1"> 1 </a> </td> <td >   </td> <td class="s"> my $adbh = shift; </td> </tr> <tr> <td class="h" > <a name="2514">2514</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $sql = shift; </td> </tr> <tr> <td class="h" > <a name="2515">2515</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $params = shift; </td> </tr> <tr> <td class="h" > <a name="2516">2516</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return showsth($adbh, sql=>$sql, params=>$params, @_); </td> </tr> <tr> <td class="h" > <a name="2517">2517</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2518">2518</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2519">2519</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # showsql </td> </tr> <tr> <td class="h" > <a name="2520">2520</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2521">2521</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2522">2522</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2523">2523</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2524">2524</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # explainsql </td> </tr> <tr> <td class="h" > <a name="2525">2525</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2526">2526</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2527">2527</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 explainsql </td> </tr> <tr> <td class="h" > <a name="2528">2528</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2529">2529</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> explainsql outputs the result of an SQL EXPLAIN call. This function works much </td> </tr> <tr> <td class="h" > <a name="2530">2530</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> like showsql. The parameters are the database handle, the SQL statement, and </td> </tr> <tr> <td class="h" > <a name="2531">2531</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> an array-ref of SQL parameters. explainsql prepends "EXPLAIN ANALYZE" to your </td> </tr> <tr> <td class="h" > <a name="2532">2532</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> SQL, runs the statement, then outputs the results. </td> </tr> <tr> <td class="h" > <a name="2533">2533</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2534">2534</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> I have only used explainsql with PostGresql. I would be interested hear about </td> </tr> <tr> <td class="h" > <a name="2535">2535</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> how it works with other database management systems and how it might be </td> </tr> <tr> <td class="h" > <a name="2536">2536</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> improved to work in those environments. </td> </tr> <tr> <td class="h" > <a name="2537">2537</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2538">2538</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="2539">2539</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2540">2540</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub explainsql { </td> </tr> <tr> <td class="h" > <a name="2541">2541</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2541-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2541-1"> 1 </a> </td> <td >   </td> <td class="s"> my ($adbh, $sql, $params_org) = @_; </td> </tr> <tr> <td class="h" > <a name="2542">2542</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my (@params, $row); </td> </tr> <tr> <td class="h" > <a name="2543">2543</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2544">2544</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # if any params, put them in @params array </td> </tr> <tr> <td class="h" > <a name="2545">2545</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2545-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (defined $params_org) { </td> </tr> <tr> <td class="h" > <a name="2546">2546</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2546-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (UNIVERSAL::isa $params_org, 'ARRAY') </td> </tr> <tr> <td class="h" > <a name="2547">2547</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { @params = @{$params_org} } </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2548">2548</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else </td> </tr> <tr> <td class="h" > <a name="2549">2549</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { @params = $params_org } </td> </tr> <tr> <td class="h" > <a name="2550">2550</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2551">2551</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2552">2552</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # modify $sql </td> </tr> <tr> <td class="h" > <a name="2553">2553</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $sql = qq|EXPLAIN ANALYZE\n$sql|; </td> </tr> <tr> <td class="h" > <a name="2554">2554</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2555">2555</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # get results row </td> </tr> <tr> <td class="h" > <a name="2556">2556</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $row = $adbh->selectrow_hashref($sql, undef, @params); </td> </tr> <tr> <td class="h" > <a name="2557">2557</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2558">2558</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # if we got a row </td> </tr> <tr> <td class="h" > <a name="2559">2559</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2559-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($row) { </td> </tr> <tr> <td class="h" > <a name="2560">2560</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> preln $sql; </td> </tr> <tr> <td class="h" > <a name="2561">2561</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2562">2562</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> preln </td> </tr> <tr> <td class="h" > <a name="2563">2563</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> qq|QUERY PLAN\n----------------------------------------\n|, </td> </tr> <tr> <td class="h" > <a name="2564">2564</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $row->{'QUERY PLAN'}; </td> </tr> <tr> <td class="h" > <a name="2565">2565</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2566">2566</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2567">2567</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # else error </td> </tr> <tr> <td class="h" > <a name="2568">2568</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else { </td> </tr> <tr> <td class="h" > <a name="2569">2569</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> println 'error getting SQL explain: ', $DBI::errstr; </td> </tr> <tr> <td class="h" > <a name="2570">2570</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2571">2571</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2572">2572</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2573">2573</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # explainsql </td> </tr> <tr> <td class="h" > <a name="2574">2574</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2575">2575</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2576">2576</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2577">2577</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2578">2578</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2579">2579</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # get_sth </td> </tr> <tr> <td class="h" > <a name="2580">2580</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # Private method </td> </tr> <tr> <td class="h" > <a name="2581">2581</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2582">2582</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub get_sth { </td> </tr> <tr> <td class="h" > <a name="2583">2583</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2583-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2583-1"> 0 </a> </td> <td >   </td> <td class="s"> my ($sth, %opts) = @_; </td> </tr> <tr> <td class="h" > <a name="2584">2584</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2585">2585</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # if $sth is a db, create a statement handle </td> </tr> <tr> <td class="h" > <a name="2586">2586</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2586-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ( UNIVERSAL::isa($sth, 'DBI::db') ) { </td> </tr> <tr> <td class="h" > <a name="2587">2587</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my ($dbh, $sql, @params); </td> </tr> <tr> <td class="h" > <a name="2588">2588</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $sql = $opts{'sql'}; </td> </tr> <tr> <td class="h" > <a name="2589">2589</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $dbh = $sth; </td> </tr> <tr> <td class="h" > <a name="2590">2590</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2591">2591</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # must have sql param </td> </tr> <tr> <td class="h" > <a name="2592">2592</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2592-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (! $sql) </td> </tr> <tr> <td class="h" > <a name="2593">2593</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { croak 'If $sth is a database handle, must have sql param' } </td> </tr> <tr> <td class="h" > <a name="2594">2594</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2595">2595</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # if any params, put them in @params array </td> </tr> <tr> <td class="h" > <a name="2596">2596</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2596-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($opts{'params'}) { </td> </tr> <tr> <td class="h" > <a name="2597">2597</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2597-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (UNIVERSAL::isa $opts{'params'}, 'ARRAY') </td> </tr> <tr> <td class="h" > <a name="2598">2598</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { @params = @{$opts{'params'}} } </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2599">2599</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else </td> </tr> <tr> <td class="h" > <a name="2600">2600</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { @params = $opts{'params'} } </td> </tr> <tr> <td class="h" > <a name="2601">2601</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2602">2602</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2603">2603</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # create statement handle </td> </tr> <tr> <td class="h" > <a name="2604">2604</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $sth = $dbh->prepare($sql); </td> </tr> <tr> <td class="h" > <a name="2605">2605</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2605-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $DBI::err and croak $DBI::errstr; </td> </tr> <tr> <td class="h" > <a name="2606">2606</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2607">2607</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # execute statement handle </td> </tr> <tr> <td class="h" > <a name="2608">2608</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $sth->execute(@params); </td> </tr> <tr> <td class="h" > <a name="2609">2609</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2609-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $DBI::err and croak $DBI::errstr; </td> </tr> <tr> <td class="h" > <a name="2610">2610</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2611">2611</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2612">2612</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # return </td> </tr> <tr> <td class="h" > <a name="2613">2613</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return $sth; </td> </tr> <tr> <td class="h" > <a name="2614">2614</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2615">2615</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2616">2616</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # get_sth </td> </tr> <tr> <td class="h" > <a name="2617">2617</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2618">2618</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2619">2619</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2620">2620</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2621">2621</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # showsth_text </td> </tr> <tr> <td class="h" > <a name="2622">2622</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2623">2623</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub showsth_text { </td> </tr> <tr> <td class="h" > <a name="2624">2624</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2624-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2624-1"> 0 </a> </td> <td >   </td> <td class="s"> my ($sth, %opts) = @_; </td> </tr> <tr> <td class="h" > <a name="2625">2625</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my ($table, @fields, @rows, $out); </td> </tr> <tr> <td class="h" > <a name="2626">2626</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> require Text::TabularDisplay; </td> </tr> <tr> <td class="h" > <a name="2627">2627</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2628">2628</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # get statement handle, in case a database handle was actually sent </td> </tr> <tr> <td class="h" > <a name="2629">2629</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # KLUDGE: I got the idea that allowing a dbh and an sql statement </td> </tr> <tr> <td class="h" > <a name="2630">2630</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # instead of a statement handle would be a good feature, in case I </td> </tr> <tr> <td class="h" > <a name="2631">2631</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # didn't actually want to go to the trouble of creating a statement </td> </tr> <tr> <td class="h" > <a name="2632">2632</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # handle just to display the results of an SQL statement. The general </td> </tr> <tr> <td class="h" > <a name="2633">2633</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # idea is good, but should have been implemented as a separate method. </td> </tr> <tr> <td class="h" > <a name="2634">2634</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # There is now a method called showsql, but it still relies on this </td> </tr> <tr> <td class="h" > <a name="2635">2635</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # method to tell if a database or statement handle was sent. The kludge </td> </tr> <tr> <td class="h" > <a name="2636">2636</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # here is that for now I'm choosing not to clean up the mess. </td> </tr> <tr> <td class="h" > <a name="2637">2637</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $sth = get_sth($sth, %opts); </td> </tr> <tr> <td class="h" > <a name="2638">2638</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2639">2639</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # ensure statement handle is executed </td> </tr> <tr> <td class="h" > <a name="2640">2640</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2640-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (! $sth->{'Active'}) { </td> </tr> <tr> <td class="h" > <a name="2641">2641</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $sth->execute(); </td> </tr> <tr> <td class="h" > <a name="2642">2642</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2642-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $DBI::err and die $DBI::errstr; </td> </tr> <tr> <td class="h" > <a name="2643">2643</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2644">2644</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2645">2645</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # get array of fields </td> </tr> <tr> <td class="h" > <a name="2646">2646</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> @fields = @{$sth->{'NAME'}}; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2647">2647</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2648">2648</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # create text-table object </td> </tr> <tr> <td class="h" > <a name="2649">2649</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $table = Text::TabularDisplay->new(@fields); </td> </tr> <tr> <td class="h" > <a name="2650">2650</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2651">2651</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # loop through rows </td> </tr> <tr> <td class="h" > <a name="2652">2652</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> while (my $row_hash = $sth->fetchrow_hashref) { </td> </tr> <tr> <td class="h" > <a name="2653">2653</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my (@row_arr); </td> </tr> <tr> <td class="h" > <a name="2654">2654</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2655">2655</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> foreach my $field (@fields) </td> </tr> <tr> <td class="h" > <a name="2656">2656</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { push @row_arr, define($row_hash->{$field}) } </td> </tr> <tr> <td class="h" > <a name="2657">2657</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2658">2658</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> push @rows, \@row_arr; </td> </tr> <tr> <td class="h" > <a name="2659">2659</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2660">2660</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2661">2661</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # populate text table </td> </tr> <tr> <td class="h" > <a name="2662">2662</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $table->populate(\@rows); </td> </tr> <tr> <td class="h" > <a name="2663">2663</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2664">2664</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # output text table </td> </tr> <tr> <td class="h" > <a name="2665">2665</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $out = $table->render(); </td> </tr> <tr> <td class="h" > <a name="2666">2666</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2667">2667</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # build header </td> </tr> <tr> <td class="h" > <a name="2668">2668</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2668-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (hascontent $opts{'title'}) { </td> </tr> <tr> <td class="h" > <a name="2669">2669</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my ($border, $title); </td> </tr> <tr> <td class="h" > <a name="2670">2670</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2671">2671</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # build top border </td> </tr> <tr> <td class="h" > <a name="2672">2672</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $border = $out; </td> </tr> <tr> <td class="h" > <a name="2673">2673</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $border =~ s|\n.*||s; </td> </tr> <tr> <td class="h" > <a name="2674">2674</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $border =~ s|\+|-|gs; </td> </tr> <tr> <td class="h" > <a name="2675">2675</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $border =~ s|^\-|+|gs; </td> </tr> <tr> <td class="h" > <a name="2676">2676</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $border =~ s|\-$|+|gs; </td> </tr> <tr> <td class="h" > <a name="2677">2677</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2678">2678</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # build title </td> </tr> <tr> <td class="h" > <a name="2679">2679</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $title = '| ' . crunch($opts{'title'}); </td> </tr> <tr> <td class="h" > <a name="2680">2680</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $title .= repeat(' ', length($border) - length($title) - 1); </td> </tr> <tr> <td class="h" > <a name="2681">2681</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $title .= '|'; </td> </tr> <tr> <td class="h" > <a name="2682">2682</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2683">2683</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # add to output </td> </tr> <tr> <td class="h" > <a name="2684">2684</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $out = $border . "\n" . $title . "\n" . $out; </td> </tr> <tr> <td class="h" > <a name="2685">2685</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2686">2686</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2687">2687</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # output </td> </tr> <tr> <td class="h" > <a name="2688">2688</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> println $out; </td> </tr> <tr> <td class="h" > <a name="2689">2689</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2690">2690</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # success </td> </tr> <tr> <td class="h" > <a name="2691">2691</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return ''; </td> </tr> <tr> <td class="h" > <a name="2692">2692</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2693">2693</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2694">2694</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # showsth_text </td> </tr> <tr> <td class="h" > <a name="2695">2695</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2696">2696</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2697">2697</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2698">2698</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2699">2699</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # showsth_web </td> </tr> <tr> <td class="h" > <a name="2700">2700</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2701">2701</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub showsth_web { </td> </tr> <tr> <td class="h" > <a name="2702">2702</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2702-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2702-1"> 0 </a> </td> <td >   </td> <td class="s"> my ($sth, %opts) = @_; </td> </tr> <tr> <td class="h" > <a name="2703">2703</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my ($first_row_done, %field_names, $formats); </td> </tr> <tr> <td class="h" > <a name="2704">2704</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> tie %field_names, 'Tie::IxHash'; </td> </tr> <tr> <td class="h" > <a name="2705">2705</a> </td> <td class="c0" > 0 </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--condition.html#2705-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $formats = $opts{'formats'} || {}; </td> </tr> <tr> <td class="h" > <a name="2706">2706</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2707">2707</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # get statement handle, in case a database handle was actually sent </td> </tr> <tr> <td class="h" > <a name="2708">2708</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # KLUDGE: I got the idea that allowing a dbh and an sql statement </td> </tr> <tr> <td class="h" > <a name="2709">2709</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # instead of a statement handle would be a good feature, in case I </td> </tr> <tr> <td class="h" > <a name="2710">2710</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # didn't actually want to go to the trouble of creating a statement </td> </tr> <tr> <td class="h" > <a name="2711">2711</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # handle just to display the results of an SQL statement. The general </td> </tr> <tr> <td class="h" > <a name="2712">2712</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # idea is good, but should have been implemented as a separate method. </td> </tr> <tr> <td class="h" > <a name="2713">2713</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # There is now a method called showsql, but it still relies on this </td> </tr> <tr> <td class="h" > <a name="2714">2714</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # method to tell if a database or statement handle was sent. The kludge </td> </tr> <tr> <td class="h" > <a name="2715">2715</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # here is that for now I'm choosing not to clean up the mess. </td> </tr> <tr> <td class="h" > <a name="2716">2716</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $sth = get_sth($sth, %opts); </td> </tr> <tr> <td class="h" > <a name="2717">2717</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2718">2718</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # get headers that are to be output first </td> </tr> <tr> <td class="h" > <a name="2719">2719</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2719-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($opts{'headers'}) { </td> </tr> <tr> <td class="h" > <a name="2720">2720</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> foreach my $field_name (@{$opts{'headers'}}) </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2721">2721</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { undef $field_names{$field_name} } </td> </tr> <tr> <td class="h" > <a name="2722">2722</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2723">2723</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2724">2724</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # open table </td> </tr> <tr> <td class="h" > <a name="2725">2725</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print <<'(HTML)'; </td> </tr> <tr> <td class="h" > <a name="2726">2726</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> <table border="1" cellpadding="3"> </td> </tr> <tr> <td class="h" > <a name="2727">2727</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> (HTML) </td> </tr> <tr> <td class="h" > <a name="2728">2728</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2729">2729</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # output title if available </td> </tr> <tr> <td class="h" > <a name="2730">2730</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2730-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (defined $opts{'title'}) { </td> </tr> <tr> <td class="h" > <a name="2731">2731</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print </td> </tr> <tr> <td class="h" > <a name="2732">2732</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> '<tr style="background-color:navy; color:white; text-align:left;">', </td> </tr> <tr> <td class="h" > <a name="2733">2733</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> '<th colspan="', </td> </tr> <tr> <td class="h" > <a name="2734">2734</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> scalar(@{$sth->{'NAME'}}), </td> </tr> <tr> <td class="h" > <a name="2735">2735</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> '">', </td> </tr> <tr> <td class="h" > <a name="2736">2736</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $opts{'title'}, </td> </tr> <tr> <td class="h" > <a name="2737">2737</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> "</th></tr>\n"; </td> </tr> <tr> <td class="h" > <a name="2738">2738</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2739">2739</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2740">2740</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # loop through records </td> </tr> <tr> <td class="h" > <a name="2741">2741</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> while (my $row = $sth->fetchrow_hashref) { </td> </tr> <tr> <td class="h" > <a name="2742">2742</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2742-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (! $first_row_done) { </td> </tr> <tr> <td class="h" > <a name="2743">2743</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # build list of headers </td> </tr> <tr> <td class="h" > <a name="2744">2744</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> foreach my $field_name (@{$sth->{'NAME'}}) { </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2745">2745</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2745-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (! exists $field_names{$field_name}) </td> </tr> <tr> <td class="h" > <a name="2746">2746</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { undef $field_names{$field_name} } </td> </tr> <tr> <td class="h" > <a name="2747">2747</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2748">2748</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2749">2749</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # open table and header row </td> </tr> <tr> <td class="h" > <a name="2750">2750</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print <<'(HTML)'; </td> </tr> <tr> <td class="h" > <a name="2751">2751</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> <thead> </td> </tr> <tr> <td class="h" > <a name="2752">2752</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> <tr valign="top" style="background-color:#99ccff; color:black; text-align:left;"> </td> </tr> <tr> <td class="h" > <a name="2753">2753</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> (HTML) </td> </tr> <tr> <td class="h" > <a name="2754">2754</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2755">2755</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # output headers </td> </tr> <tr> <td class="h" > <a name="2756">2756</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> foreach my $field_name (keys %field_names) { </td> </tr> <tr> <td class="h" > <a name="2757">2757</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print '<th>', htmlesc($field_name), "</th>\n"; </td> </tr> <tr> <td class="h" > <a name="2758">2758</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2759">2759</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2760">2760</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # close header row </td> </tr> <tr> <td class="h" > <a name="2761">2761</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print <<'(HTML)'; </td> </tr> <tr> <td class="h" > <a name="2762">2762</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </tr> </td> </tr> <tr> <td class="h" > <a name="2763">2763</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </thead> </td> </tr> <tr> <td class="h" > <a name="2764">2764</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> <tbody> </td> </tr> <tr> <td class="h" > <a name="2765">2765</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> (HTML) </td> </tr> <tr> <td class="h" > <a name="2766">2766</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2767">2767</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # note table headers have been output </td> </tr> <tr> <td class="h" > <a name="2768">2768</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $first_row_done = 1; </td> </tr> <tr> <td class="h" > <a name="2769">2769</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2770">2770</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2771">2771</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # open row </td> </tr> <tr> <td class="h" > <a name="2772">2772</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print '<tr style="background-color:white; color:black; text-align:left; vertical-align:top;">'; </td> </tr> <tr> <td class="h" > <a name="2773">2773</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2774">2774</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # loop through fields </td> </tr> <tr> <td class="h" > <a name="2775">2775</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> foreach my $field_name (keys %field_names) { </td> </tr> <tr> <td class="h" > <a name="2776">2776</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my ($value, $format); </td> </tr> <tr> <td class="h" > <a name="2777">2777</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $value = $row->{$field_name}; </td> </tr> <tr> <td class="h" > <a name="2778">2778</a> </td> <td class="c0" > 0 </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--condition.html#2778-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $format = $formats->{$field_name} || {}; </td> </tr> <tr> <td class="h" > <a name="2779">2779</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2780">2780</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # <td> </td> </tr> <tr> <td class="h" > <a name="2781">2781</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2781-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($format->{'align'}) </td> </tr> <tr> <td class="h" > <a name="2782">2782</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { print qq|<td align="$format->{'align'}">| } </td> </tr> <tr> <td class="h" > <a name="2783">2783</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else </td> </tr> <tr> <td class="h" > <a name="2784">2784</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { print '<td>' } </td> </tr> <tr> <td class="h" > <a name="2785">2785</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2786">2786</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2786-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (defined $value) { </td> </tr> <tr> <td class="h" > <a name="2787">2787</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2787-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($value eq '') { </td> </tr> <tr> <td class="h" > <a name="2788">2788</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print '<i>[empty string]</i>'; </td> </tr> <tr> <td class="h" > <a name="2789">2789</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2790">2790</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2791">2791</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else { </td> </tr> <tr> <td class="h" > <a name="2792">2792</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $output = htmlesc($value); </td> </tr> <tr> <td class="h" > <a name="2793">2793</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2794">2794</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # pre </td> </tr> <tr> <td class="h" > <a name="2795">2795</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2795-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($format->{'pre'}) { </td> </tr> <tr> <td class="h" > <a name="2796">2796</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $output =~ s|\t| |gs; </td> </tr> <tr> <td class="h" > <a name="2797">2797</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $output = "<pre>$output</pre>"; </td> </tr> <tr> <td class="h" > <a name="2798">2798</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2799">2799</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2800">2800</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print $output; </td> </tr> <tr> <td class="h" > <a name="2801">2801</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2802">2802</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2803">2803</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2804">2804</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else { </td> </tr> <tr> <td class="h" > <a name="2805">2805</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print '<i>[undef]</i>'; </td> </tr> <tr> <td class="h" > <a name="2806">2806</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2807">2807</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2808">2808</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print "</td>\n"; </td> </tr> <tr> <td class="h" > <a name="2809">2809</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2810">2810</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2811">2811</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # close row </td> </tr> <tr> <td class="h" > <a name="2812">2812</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print "</tr>\n"; </td> </tr> <tr> <td class="h" > <a name="2813">2813</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2814">2814</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2815">2815</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # close table or mention that there were no records </td> </tr> <tr> <td class="h" > <a name="2816">2816</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2816-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($first_row_done) { </td> </tr> <tr> <td class="h" > <a name="2817">2817</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print qq|</tbody>\n|; </td> </tr> <tr> <td class="h" > <a name="2818">2818</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2819">2819</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2820">2820</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else { </td> </tr> <tr> <td class="h" > <a name="2821">2821</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print qq|</thead><tbody><tr><td>no records</td></tr>\n</tbody>\n|; </td> </tr> <tr> <td class="h" > <a name="2822">2822</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2823">2823</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2824">2824</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print qq|</table>\n|; </td> </tr> <tr> <td class="h" > <a name="2825">2825</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2826">2826</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2827">2827</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # showsth_web </td> </tr> <tr> <td class="h" > <a name="2828">2828</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2829">2829</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2830">2830</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2831">2831</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2832">2832</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2833">2833</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # tempshowstuff </td> </tr> <tr> <td class="h" > <a name="2834">2834</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2835">2835</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2836">2836</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 tempshowstuff </td> </tr> <tr> <td class="h" > <a name="2837">2837</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2838">2838</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Temporarily turn showstuff on or off. Create a variable in the lexical scope </td> </tr> <tr> <td class="h" > <a name="2839">2839</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> where you want the tempoary change, like this: </td> </tr> <tr> <td class="h" > <a name="2840">2840</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2841">2841</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $temp = tempshowstuff(1) </td> </tr> <tr> <td class="h" > <a name="2842">2842</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2843">2843</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> When the variable goes out of scope, showstuff will revert back to its previous </td> </tr> <tr> <td class="h" > <a name="2844">2844</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> state. </td> </tr> <tr> <td class="h" > <a name="2845">2845</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2846">2846</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="2847">2847</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2848">2848</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub tempshowstuff { </td> </tr> <tr> <td class="h" > <a name="2849">2849</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2849-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2849-1"> 1 </a> </td> <td >   </td> <td class="s"> return Debug::ShowStuff::TempShowStuff->new(); </td> </tr> <tr> <td class="h" > <a name="2850">2850</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2851">2851</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2852">2852</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # tempshowstuff </td> </tr> <tr> <td class="h" > <a name="2853">2853</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2854">2854</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2855">2855</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2856">2856</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2857">2857</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # showisa </td> </tr> <tr> <td class="h" > <a name="2858">2858</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2859">2859</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2860">2860</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 showisa </td> </tr> <tr> <td class="h" > <a name="2861">2861</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2862">2862</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Outputs the ISA hierarchy of an object or class. For example, the following </td> </tr> <tr> <td class="h" > <a name="2863">2863</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> code outputs the ISA hierarchy for a Xapat object (Xapat is a web server </td> </tr> <tr> <td class="h" > <a name="2864">2864</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> written in Perl and which uses Net::Server). </td> </tr> <tr> <td class="h" > <a name="2865">2865</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2866">2866</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $xapat = Xapat->new(%opts); </td> </tr> <tr> <td class="h" > <a name="2867">2867</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> showisa $xapat; </td> </tr> <tr> <td class="h" > <a name="2868">2868</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2869">2869</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> which outputs: </td> </tr> <tr> <td class="h" > <a name="2870">2870</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2871">2871</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2872">2872</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Xapat </td> </tr> <tr> <td class="h" > <a name="2873">2873</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Net::Server::HTTP </td> </tr> <tr> <td class="h" > <a name="2874">2874</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Net::Server::MultiType </td> </tr> <tr> <td class="h" > <a name="2875">2875</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Net::Server </td> </tr> <tr> <td class="h" > <a name="2876">2876</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2877">2877</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2878">2878</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Note that showisa loads Class::ISA, which is available on CPAN. </td> </tr> <tr> <td class="h" > <a name="2879">2879</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2880">2880</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="2881">2881</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2882">2882</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub showisa { </td> </tr> <tr> <td class="h" > <a name="2883">2883</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2883-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2883-1"> 1 </a> </td> <td >   </td> <td class="s"> my ($class) = @_; </td> </tr> <tr> <td class="h" > <a name="2884">2884</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my (@isas); </td> </tr> <tr> <td class="h" > <a name="2885">2885</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2886">2886</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # load necessary module </td> </tr> <tr> <td class="h" > <a name="2887">2887</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> require Class::ISA; </td> </tr> <tr> <td class="h" > <a name="2888">2888</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2889">2889</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # if $class is an object, get its class </td> </tr> <tr> <td class="h" > <a name="2890">2890</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2890-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (ref $class) </td> </tr> <tr> <td class="h" > <a name="2891">2891</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { $class = ref $class } </td> </tr> <tr> <td class="h" > <a name="2892">2892</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2893">2893</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # get class hierarchy </td> </tr> <tr> <td class="h" > <a name="2894">2894</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> @isas = Class::ISA::self_and_super_path($class); </td> </tr> <tr> <td class="h" > <a name="2895">2895</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2896">2896</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # show class hierarchy </td> </tr> <tr> <td class="h" > <a name="2897">2897</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> showarr @isas; </td> </tr> <tr> <td class="h" > <a name="2898">2898</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2899">2899</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2900">2900</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # showisa </td> </tr> <tr> <td class="h" > <a name="2901">2901</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2902">2902</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2903">2903</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2904">2904</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2905">2905</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2906">2906</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # timer </td> </tr> <tr> <td class="h" > <a name="2907">2907</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2908">2908</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2909">2909</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 timer </td> </tr> <tr> <td class="h" > <a name="2910">2910</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2911">2911</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> This function is for when you want to display how long it took for your code to </td> </tr> <tr> <td class="h" > <a name="2912">2912</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> run. Assign the return value of this function to a variable. When the </td> </tr> <tr> <td class="h" > <a name="2913">2913</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> variable goes out of scope then the difference between the start and end time </td> </tr> <tr> <td class="h" > <a name="2914">2914</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> is displayed in seconds. For example, the following code: </td> </tr> <tr> <td class="h" > <a name="2915">2915</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2916">2916</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> do { </td> </tr> <tr> <td class="h" > <a name="2917">2917</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $timer = timer(); </td> </tr> <tr> <td class="h" > <a name="2918">2918</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sleep 3; </td> </tr> <tr> <td class="h" > <a name="2919">2919</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> }; </td> </tr> <tr> <td class="h" > <a name="2920">2920</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2921">2921</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> outputs this: </td> </tr> <tr> <td class="h" > <a name="2922">2922</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2923">2923</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> start timer </td> </tr> <tr> <td class="h" > <a name="2924">2924</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> duration: 3 seconds </td> </tr> <tr> <td class="h" > <a name="2925">2925</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2926">2926</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> B<option:> title </td> </tr> <tr> <td class="h" > <a name="2927">2927</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2928">2928</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> If you send the C<title> option, then that title will be displayed with the </td> </tr> <tr> <td class="h" > <a name="2929">2929</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> beginning and ending output. For example, this code: </td> </tr> <tr> <td class="h" > <a name="2930">2930</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2931">2931</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> do { </td> </tr> <tr> <td class="h" > <a name="2932">2932</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $timer = timer(title=>'my block'); </td> </tr> <tr> <td class="h" > <a name="2933">2933</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sleep 3; </td> </tr> <tr> <td class="h" > <a name="2934">2934</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> }; </td> </tr> <tr> <td class="h" > <a name="2935">2935</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2936">2936</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> produces this output: </td> </tr> <tr> <td class="h" > <a name="2937">2937</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2938">2938</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> start timer - my block </td> </tr> <tr> <td class="h" > <a name="2939">2939</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> duration - my block: 3 seconds </td> </tr> <tr> <td class="h" > <a name="2940">2940</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2941">2941</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> B<method:> $timer->elapsed </td> </tr> <tr> <td class="h" > <a name="2942">2942</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2943">2943</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Returns the difference between when the timer was started and the current </td> </tr> <tr> <td class="h" > <a name="2944">2944</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> time. </td> </tr> <tr> <td class="h" > <a name="2945">2945</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2946">2946</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> B<method:> $timer->silence </td> </tr> <tr> <td class="h" > <a name="2947">2947</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2948">2948</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Turns off the timer so that it doesn't display anything when it dies. </td> </tr> <tr> <td class="h" > <a name="2949">2949</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2950">2950</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2951">2951</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="2952">2952</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2953">2953</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub timer { </td> </tr> <tr> <td class="h" > <a name="2954">2954</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2954-1"> 0 </a> </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2954-1"> 1 </a> </td> <td >   </td> <td class="s"> my (%opts) = @_; </td> </tr> <tr> <td class="h" > <a name="2955">2955</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return Debug::ShowStuff::Timer->new(%opts); </td> </tr> <tr> <td class="h" > <a name="2956">2956</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2957">2957</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2958">2958</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # timer </td> </tr> <tr> <td class="h" > <a name="2959">2959</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2960">2960</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2961">2961</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2962">2962</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2963">2963</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # backtrace </td> </tr> <tr> <td class="h" > <a name="2964">2964</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2965">2965</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub backtrace { </td> </tr> <tr> <td class="h" > <a name="2966">2966</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2966-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2966-1"> 0 </a> </td> <td >   </td> <td class="s"> my (%opts); </td> </tr> <tr> <td class="h" > <a name="2967">2967</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2968">2968</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # if just one param, assume that's the title </td> </tr> <tr> <td class="h" > <a name="2969">2969</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2969-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (@_ == 1) </td> </tr> <tr> <td class="h" > <a name="2970">2970</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { %opts = (title=>@_) } </td> </tr> <tr> <td class="h" > <a name="2971">2971</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else </td> </tr> <tr> <td class="h" > <a name="2972">2972</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { %opts = @_ } </td> </tr> <tr> <td class="h" > <a name="2973">2973</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2974">2974</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2975">2975</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#2975-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (inweb()) </td> </tr> <tr> <td class="h" > <a name="2976">2976</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { return backtrace_web(%opts) } </td> </tr> <tr> <td class="h" > <a name="2977">2977</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else </td> </tr> <tr> <td class="h" > <a name="2978">2978</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { return backtrace_text(%opts) } </td> </tr> <tr> <td class="h" > <a name="2979">2979</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="2980">2980</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2981">2981</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # backtrace </td> </tr> <tr> <td class="h" > <a name="2982">2982</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2983">2983</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2984">2984</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="2985">2985</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="2986">2986</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # backtrace_text </td> </tr> <tr> <td class="h" > <a name="2987">2987</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # Private subroutine </td> </tr> <tr> <td class="h" > <a name="2988">2988</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="2989">2989</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub backtrace_text { </td> </tr> <tr> <td class="h" > <a name="2990">2990</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2990-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#2990-1"> 0 </a> </td> <td >   </td> <td class="s"> my (%opts) = @_; </td> </tr> <tr> <td class="h" > <a name="2991">2991</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my ($indent, $table, @frames, $render); </td> </tr> <tr> <td class="h" > <a name="2992">2992</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2993">2993</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # load Devel::Backtrace module </td> </tr> <tr> <td class="h" > <a name="2994">2994</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> require Text::TabularDisplay; </td> </tr> <tr> <td class="h" > <a name="2995">2995</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2996">2996</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # indent to make a nice clean backtrace </td> </tr> <tr> <td class="h" > <a name="2997">2997</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $indent = indent(); </td> </tr> <tr> <td class="h" > <a name="2998">2998</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="2999">2999</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # get frames </td> </tr> <tr> <td class="h" > <a name="3000">3000</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> @frames = backtrace_frames(); </td> </tr> <tr> <td class="h" > <a name="3001">3001</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3002">3002</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # create text-table object </td> </tr> <tr> <td class="h" > <a name="3003">3003</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $table = Text::TabularDisplay->new(qw(line package sub)); </td> </tr> <tr> <td class="h" > <a name="3004">3004</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3005">3005</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # populate text table </td> </tr> <tr> <td class="h" > <a name="3006">3006</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $table->populate(\@frames); </td> </tr> <tr> <td class="h" > <a name="3007">3007</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3008">3008</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # get rendered table </td> </tr> <tr> <td class="h" > <a name="3009">3009</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $render = $table->render(); </td> </tr> <tr> <td class="h" > <a name="3010">3010</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3011">3011</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # if there is any message </td> </tr> <tr> <td class="h" > <a name="3012">3012</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3012-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (hascontent $opts{'title'}) { </td> </tr> <tr> <td class="h" > <a name="3013">3013</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my ($first_line, $line_length, $title); </td> </tr> <tr> <td class="h" > <a name="3014">3014</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # build first line of table </td> </tr> <tr> <td class="h" > <a name="3015">3015</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $first_line = $render; </td> </tr> <tr> <td class="h" > <a name="3016">3016</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $first_line =~ s|\n.*||s; </td> </tr> <tr> <td class="h" > <a name="3017">3017</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $first_line =~ s|[^-]|-|gs; </td> </tr> <tr> <td class="h" > <a name="3018">3018</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $first_line =~ s|^.|+|gs; </td> </tr> <tr> <td class="h" > <a name="3019">3019</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $first_line =~ s|.$|+|gs; </td> </tr> <tr> <td class="h" > <a name="3020">3020</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $line_length = length($first_line) - 1; </td> </tr> <tr> <td class="h" > <a name="3021">3021</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3022">3022</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # build title line </td> </tr> <tr> <td class="h" > <a name="3023">3023</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $title = '| ' . $opts{'title'}; </td> </tr> <tr> <td class="h" > <a name="3024">3024</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> while (length($title) < $line_length) {$title .= ' '} </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3025">3025</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $title .= '|'; </td> </tr> <tr> <td class="h" > <a name="3026">3026</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3027">3027</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # build $render </td> </tr> <tr> <td class="h" > <a name="3028">3028</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $render = $first_line . "\n" . $title. "\n" . $render; </td> </tr> <tr> <td class="h" > <a name="3029">3029</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3030">3030</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3031">3031</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # output </td> </tr> <tr> <td class="h" > <a name="3032">3032</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> println $render; </td> </tr> <tr> <td class="h" > <a name="3033">3033</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3034">3034</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3035">3035</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # backtrace_text </td> </tr> <tr> <td class="h" > <a name="3036">3036</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3037">3037</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3038">3038</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3039">3039</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3040">3040</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # backtrace_web </td> </tr> <tr> <td class="h" > <a name="3041">3041</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # Private subroutine </td> </tr> <tr> <td class="h" > <a name="3042">3042</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3043">3043</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub backtrace_web { </td> </tr> <tr> <td class="h" > <a name="3044">3044</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3044-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3044-1"> 0 </a> </td> <td >   </td> <td class="s"> my (%opts) = @_; </td> </tr> <tr> <td class="h" > <a name="3045">3045</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my ($last_sub, @frames, $render, $fh, $html, $title); </td> </tr> <tr> <td class="h" > <a name="3046">3046</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3046-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> showstuff() or return ''; </td> </tr> <tr> <td class="h" > <a name="3047">3047</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3048">3048</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # get output handle </td> </tr> <tr> <td class="h" > <a name="3049">3049</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $fh = getfh(wantarray()); </td> </tr> <tr> <td class="h" > <a name="3050">3050</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3051">3051</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # get frames </td> </tr> <tr> <td class="h" > <a name="3052">3052</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> @frames = backtrace_frames(); </td> </tr> <tr> <td class="h" > <a name="3053">3053</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3054">3054</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # title row </td> </tr> <tr> <td class="h" > <a name="3055">3055</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3055-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (defined $opts{'title'}) { </td> </tr> <tr> <td class="h" > <a name="3056">3056</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $title = htmlesc($opts{'title'}); </td> </tr> <tr> <td class="h" > <a name="3057">3057</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3058">3058</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print STDERR 'BACKTRACE: ', $title, "\n"; </td> </tr> <tr> <td class="h" > <a name="3059">3059</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3060">3060</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else { </td> </tr> <tr> <td class="h" > <a name="3061">3061</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $title = 'stack trace'; </td> </tr> <tr> <td class="h" > <a name="3062">3062</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3063">3063</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3064">3064</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # start table </td> </tr> <tr> <td class="h" > <a name="3065">3065</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $html = <<"(HTML)"; </td> </tr> <tr> <td class="h" > <a name="3066">3066</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> <table style="background-color:white;color:black" border="1"> </td> </tr> <tr> <td class="h" > <a name="3067">3067</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> <tr> </td> </tr> <tr> <td class="h" > <a name="3068">3068</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> <th colspan="3" style="background-color:navy;color:white">$title</th> </td> </tr> <tr> <td class="h" > <a name="3069">3069</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </tr> </td> </tr> <tr> <td class="h" > <a name="3070">3070</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> <tr colspan="3" style="background-color:#dddddd;"> </td> </tr> <tr> <td class="h" > <a name="3071">3071</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> <th>line</th> </td> </tr> <tr> <td class="h" > <a name="3072">3072</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> <th>module</th> </td> </tr> <tr> <td class="h" > <a name="3073">3073</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> <th>sub</th> </td> </tr> <tr> <td class="h" > <a name="3074">3074</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </tr> </td> </tr> <tr> <td class="h" > <a name="3075">3075</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> (HTML) </td> </tr> <tr> <td class="h" > <a name="3076">3076</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3077">3077</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # loop through frames </td> </tr> <tr> <td class="h" > <a name="3078">3078</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> foreach my $frame (@frames) { </td> </tr> <tr> <td class="h" > <a name="3079">3079</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $mod = htmlesc($frame->[1]); </td> </tr> <tr> <td class="h" > <a name="3080">3080</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3081">3081</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # break up module name </td> </tr> <tr> <td class="h" > <a name="3082">3082</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $mod =~ s|::|:: |gs; </td> </tr> <tr> <td class="h" > <a name="3083">3083</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3084">3084</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $html .= </td> </tr> <tr> <td class="h" > <a name="3085">3085</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> qq|<tr valign="top">\n<td align="right">| . </td> </tr> <tr> <td class="h" > <a name="3086">3086</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> htmlesc($frame->[0]) . </td> </tr> <tr> <td class="h" > <a name="3087">3087</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> "</td>\n<td>" . </td> </tr> <tr> <td class="h" > <a name="3088">3088</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $mod . </td> </tr> <tr> <td class="h" > <a name="3089">3089</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> "</td>\n<td>" . </td> </tr> <tr> <td class="h" > <a name="3090">3090</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> htmlesc($frame->[2]) . </td> </tr> <tr> <td class="h" > <a name="3091">3091</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> "</td>\n</tr>\n\n"; </td> </tr> <tr> <td class="h" > <a name="3092">3092</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3093">3093</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3094">3094</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # close table </td> </tr> <tr> <td class="h" > <a name="3095">3095</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $html .= "\n</table>"; </td> </tr> <tr> <td class="h" > <a name="3096">3096</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3097">3097</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # note dying if doing so </td> </tr> <tr> <td class="h" > <a name="3098">3098</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3098-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($opts{'die'}) </td> </tr> <tr> <td class="h" > <a name="3099">3099</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { println 'die' } </td> </tr> <tr> <td class="h" > <a name="3100">3100</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3101">3101</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # output </td> </tr> <tr> <td class="h" > <a name="3102">3102</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # print $fh '<xmp>', $html, '</xmp>'; </td> </tr> <tr> <td class="h" > <a name="3103">3103</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print $fh $html; </td> </tr> <tr> <td class="h" > <a name="3104">3104</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3105">3105</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3106">3106</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # backtrace_web </td> </tr> <tr> <td class="h" > <a name="3107">3107</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3108">3108</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3109">3109</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3110">3110</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3111">3111</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # backtrace_frames </td> </tr> <tr> <td class="h" > <a name="3112">3112</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3113">3113</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub backtrace_frames { </td> </tr> <tr> <td class="h" > <a name="3114">3114</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3114-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3114-1"> 0 </a> </td> <td >   </td> <td class="s"> my ($trace, @frames, $last_sub); </td> </tr> <tr> <td class="h" > <a name="3115">3115</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3116">3116</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # create backtrace object </td> </tr> <tr> <td class="h" > <a name="3117">3117</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> require Devel::StackTrace; </td> </tr> <tr> <td class="h" > <a name="3118">3118</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $trace = Devel::StackTrace->new; </td> </tr> <tr> <td class="h" > <a name="3119">3119</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3120">3120</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # from bottom (least recent) of stack to top. </td> </tr> <tr> <td class="h" > <a name="3121">3121</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> while (my $frame = $trace->prev_frame) { </td> </tr> <tr> <td class="h" > <a name="3122">3122</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my ($sub); </td> </tr> <tr> <td class="h" > <a name="3123">3123</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3124">3124</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # if the subroutine from the previous iteration exists, </td> </tr> <tr> <td class="h" > <a name="3125">3125</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # output it, otherwise empty string </td> </tr> <tr> <td class="h" > <a name="3126">3126</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3126-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (defined $last_sub) </td> </tr> <tr> <td class="h" > <a name="3127">3127</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { $sub = $last_sub } </td> </tr> <tr> <td class="h" > <a name="3128">3128</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else </td> </tr> <tr> <td class="h" > <a name="3129">3129</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { $sub = '-' } </td> </tr> <tr> <td class="h" > <a name="3130">3130</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3131">3131</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # now hold on to last sub </td> </tr> <tr> <td class="h" > <a name="3132">3132</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $last_sub = $frame->subroutine; </td> </tr> <tr> <td class="h" > <a name="3133">3133</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $last_sub =~ s|^.*\:||s; </td> </tr> <tr> <td class="h" > <a name="3134">3134</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3135">3135</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # add frame data </td> </tr> <tr> <td class="h" > <a name="3136">3136</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> push @frames, [ </td> </tr> <tr> <td class="h" > <a name="3137">3137</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $frame->line, </td> </tr> <tr> <td class="h" > <a name="3138">3138</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $frame->package, </td> </tr> <tr> <td class="h" > <a name="3139">3139</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $sub]; </td> </tr> <tr> <td class="h" > <a name="3140">3140</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3141">3141</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3142">3142</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # remove last two frames, which are just this subroutine and the caller </td> </tr> <tr> <td class="h" > <a name="3143">3143</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> pop @frames; </td> </tr> <tr> <td class="h" > <a name="3144">3144</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> pop @frames; </td> </tr> <tr> <td class="h" > <a name="3145">3145</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # pop @frames; </td> </tr> <tr> <td class="h" > <a name="3146">3146</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3147">3147</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # special case: if called from dietrace, don't include that in output </td> </tr> <tr> <td class="h" > <a name="3148">3148</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3148-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($frames[-1]->[2] eq 'dietrace') </td> </tr> <tr> <td class="h" > <a name="3149">3149</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { pop @frames } </td> </tr> <tr> <td class="h" > <a name="3150">3150</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3151">3151</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # return </td> </tr> <tr> <td class="h" > <a name="3152">3152</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return @frames; </td> </tr> <tr> <td class="h" > <a name="3153">3153</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3154">3154</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3155">3155</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # backtrace_frames </td> </tr> <tr> <td class="h" > <a name="3156">3156</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3157">3157</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3158">3158</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3159">3159</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3160">3160</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # dietrace </td> </tr> <tr> <td class="h" > <a name="3161">3161</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3162">3162</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub dietrace { </td> </tr> <tr> <td class="h" > <a name="3163">3163</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # showstuff(1); </td> </tr> <tr> <td class="h" > <a name="3164">3164</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3164-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3164-1"> 0 </a> </td> <td >   </td> <td class="s"> backtrace(@_); </td> </tr> <tr> <td class="h" > <a name="3165">3165</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3166">3166</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # die </td> </tr> <tr> <td class="h" > <a name="3167">3167</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> die '[die]'; </td> </tr> <tr> <td class="h" > <a name="3168">3168</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3169">3169</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3170">3170</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # dietrace </td> </tr> <tr> <td class="h" > <a name="3171">3171</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3172">3172</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3173">3173</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3174">3174</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3175">3175</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3176">3176</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ############################################################################### </td> </tr> <tr> <td class="h" > <a name="3177">3177</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # ShowStdErr </td> </tr> <tr> <td class="h" > <a name="3178">3178</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3179">3179</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> package Debug::ShowStuff::ShowStdErr; </td> </tr> <tr> <td class="h" > <a name="3180">3180</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3180-1"> 1 </a> </td> <td >   </td> <td > 11599 </td> <td class="s"> use strict; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 3 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 8181 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3181">3181</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3182">3182</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3183">3183</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #--------------------------------------------------------------------------- </td> </tr> <tr> <td class="h" > <a name="3184">3184</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # new </td> </tr> <tr> <td class="h" > <a name="3185">3185</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3186">3186</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub new { </td> </tr> <tr> <td class="h" > <a name="3187">3187</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3187-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> my ($class, %opts) = @_; </td> </tr> <tr> <td class="h" > <a name="3188">3188</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $self = bless({}, $class); </td> </tr> <tr> <td class="h" > <a name="3189">3189</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3190">3190</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # default to HTML environment if environment appears to indicate so </td> </tr> <tr> <td class="h" > <a name="3191">3191</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3191-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--condition.html#3191-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ( (! defined $opts{'html'}) && $ENV{'REQUEST_URI'}) </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3192">3192</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> {$opts{'html'} = 1} </td> </tr> <tr> <td class="h" > <a name="3193">3193</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3194">3194</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # default certain properties based on html </td> </tr> <tr> <td class="h" > <a name="3195">3195</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3195-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($opts{'html'}) { </td> </tr> <tr> <td class="h" > <a name="3196">3196</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3196-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> defined($opts{'flushtostderr'}) or $opts{'flushtostderr'} = 1; </td> </tr> <tr> <td class="h" > <a name="3197">3197</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3197-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> defined($opts{'stderrfirst'}) or $opts{'stderrfirst'} = 1; </td> </tr> <tr> <td class="h" > <a name="3198">3198</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3199">3199</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3200">3200</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # default to output STDERR first </td> </tr> <tr> <td class="h" > <a name="3201">3201</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3201-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $opts{'stderrfirst'} = exists($opts{'stderrfirst'}) ? $opts{'stderrfirst'} : 1; </td> </tr> <tr> <td class="h" > <a name="3202">3202</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3203">3203</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # other properties </td> </tr> <tr> <td class="h" > <a name="3204">3204</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{'html'} = $opts{'html'}; </td> </tr> <tr> <td class="h" > <a name="3205">3205</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{'flushtostderr'} = $opts{'flushtostderr'}; </td> </tr> <tr> <td class="h" > <a name="3206">3206</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{'stderrfirst'} = $opts{'stderrfirst'}; </td> </tr> <tr> <td class="h" > <a name="3207">3207</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3208">3208</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # capture STDERR </td> </tr> <tr> <td class="h" > <a name="3209">3209</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{'stderrdata'} = {'str' => []}; </td> </tr> <tr> <td class="h" > <a name="3210">3210</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3210-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> open(SAVEERR, ">&STDERR") or warn "Cannot save STDERR: $!\n"; </td> </tr> <tr> <td class="h" > <a name="3211">3211</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print SAVEERR ''; </td> </tr> <tr> <td class="h" > <a name="3212">3212</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{'saveerr'} = *SAVEERR; </td> </tr> <tr> <td class="h" > <a name="3213">3213</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{'caperr'} = tie(*STDERR, $class . '::HandleOb', $self->{'stderrdata'}, %opts); </td> </tr> <tr> <td class="h" > <a name="3214">3214</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3215">3215</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # capture STDOUT </td> </tr> <tr> <td class="h" > <a name="3216">3216</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3216-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($opts{'stderrfirst'}) { </td> </tr> <tr> <td class="h" > <a name="3217">3217</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{'stdoutdata'} = {'str' => []}; </td> </tr> <tr> <td class="h" > <a name="3218">3218</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3219">3219</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3219-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> open(SAVESTD, ">&STDOUT") or warn "Cannot save STDOUT: $!\n"; </td> </tr> <tr> <td class="h" > <a name="3220">3220</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print SAVESTD ''; </td> </tr> <tr> <td class="h" > <a name="3221">3221</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{'savestd'} = *SAVESTD; </td> </tr> <tr> <td class="h" > <a name="3222">3222</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{'capstd'} = tie(*STDOUT, $class . '::HandleOb', $self->{'stdoutdata'}, %opts); </td> </tr> <tr> <td class="h" > <a name="3223">3223</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3224">3224</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3225">3225</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # warn() doesn't seem to print to STDERR through Perl. </td> </tr> <tr> <td class="h" > <a name="3226">3226</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # Catch that manually. </td> </tr> <tr> <td class="h" > <a name="3227">3227</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{'oldwarn'} = $SIG{__WARN__}; </td> </tr> <tr> <td class="h" > <a name="3228">3228</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3228-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> $SIG{__WARN__}= sub {print STDERR "@_"}; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3229">3229</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3230">3230</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return $self; </td> </tr> <tr> <td class="h" > <a name="3231">3231</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3232">3232</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3233">3233</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # new </td> </tr> <tr> <td class="h" > <a name="3234">3234</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #--------------------------------------------------------------------------- </td> </tr> <tr> <td class="h" > <a name="3235">3235</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3236">3236</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3237">3237</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #--------------------------------------------------------------------------- </td> </tr> <tr> <td class="h" > <a name="3238">3238</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # displaystderr </td> </tr> <tr> <td class="h" > <a name="3239">3239</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3240">3240</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub displaystderr { </td> </tr> <tr> <td class="h" > <a name="3241">3241</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3241-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> my ($self) = @_; </td> </tr> <tr> <td class="h" > <a name="3242">3242</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3243">3243</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # early exit: if there isn't anything in STDERR, do nothing </td> </tr> <tr> <td class="h" > <a name="3244">3244</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3244-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> unless (@{$self->{'stderrdata'}->{'str'}}) </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3245">3245</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> {return} </td> </tr> <tr> <td class="h" > <a name="3246">3246</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3247">3247</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # output to the real STDERR if necessary </td> </tr> <tr> <td class="h" > <a name="3248">3248</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3248-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($self->{'flushtostderr'}) </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3249">3249</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> {print STDERR join("\n",@{$self->{'stderrdata'}->{'str'}})} </td> </tr> <tr> <td class="h" > <a name="3250">3250</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3251">3251</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # output as HTML if set to do so </td> </tr> <tr> <td class="h" > <a name="3252">3252</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3252-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($self->{'html'}) { </td> </tr> <tr> <td class="h" > <a name="3253">3253</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print </td> </tr> <tr> <td class="h" > <a name="3254">3254</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> '<DIV STYLE="border-style:solid;border-width:1;padding:5;background-color:CCCCCC;color:black;">', </td> </tr> <tr> <td class="h" > <a name="3255">3255</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> "<H2 STYLE=\"margin-top:0px;\">STDERR</H2>\n<PRE>\n"; </td> </tr> <tr> <td class="h" > <a name="3256">3256</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3257">3257</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> foreach my $line (@{$self->{'stderrdata'}->{'str'}}) { </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3258">3258</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # escape the HTML </td> </tr> <tr> <td class="h" > <a name="3259">3259</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $line =~ s|&|&|g; </td> </tr> <tr> <td class="h" > <a name="3260">3260</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $line =~ s|"|"|g; </td> </tr> <tr> <td class="h" > <a name="3261">3261</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $line =~ s|'|'|g; </td> </tr> <tr> <td class="h" > <a name="3262">3262</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $line =~ s|<|<|g; </td> </tr> <tr> <td class="h" > <a name="3263">3263</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $line =~ s|>|>|g; </td> </tr> <tr> <td class="h" > <a name="3264">3264</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3265">3265</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # output the line </td> </tr> <tr> <td class="h" > <a name="3266">3266</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print $line; </td> </tr> <tr> <td class="h" > <a name="3267">3267</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3268">3268</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3269">3269</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print "</PRE>\n</DIV>\n\n"; </td> </tr> <tr> <td class="h" > <a name="3270">3270</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3271">3271</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3272">3272</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # else output as text </td> </tr> <tr> <td class="h" > <a name="3273">3273</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else { </td> </tr> <tr> <td class="h" > <a name="3274">3274</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print </td> </tr> <tr> <td class="h" > <a name="3275">3275</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> "========================================================================\n", </td> </tr> <tr> <td class="h" > <a name="3276">3276</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> "STDERR\n\n", </td> </tr> <tr> <td class="h" > <a name="3277">3277</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> @{$self->{'stderrdata'}->{'str'}}, "\n", </td> </tr> <tr> <td class="h" > <a name="3278">3278</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> "========================================================================\n"; </td> </tr> <tr> <td class="h" > <a name="3279">3279</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3280">3280</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3281">3281</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3282">3282</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # displaystderr </td> </tr> <tr> <td class="h" > <a name="3283">3283</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #--------------------------------------------------------------------------- </td> </tr> <tr> <td class="h" > <a name="3284">3284</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3285">3285</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3286">3286</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3287">3287</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # DESTROY </td> </tr> <tr> <td class="h" > <a name="3288">3288</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3289">3289</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> DESTROY { </td> </tr> <tr> <td class="h" > <a name="3290">3290</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3290-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> my ($self) = @_; </td> </tr> <tr> <td class="h" > <a name="3291">3291</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3292">3292</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3293">3293</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # release handles </td> </tr> <tr> <td class="h" > <a name="3294">3294</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3295">3295</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $SIG{__WARN__} = $self->{'oldwarn'}; </td> </tr> <tr> <td class="h" > <a name="3296">3296</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3297">3297</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> undef $self->{'caperr'}; # as documented in "perltie" </td> </tr> <tr> <td class="h" > <a name="3298">3298</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3298-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> untie(*STDERR) or warn("Cannot untie STDERR: $!\n"); </td> </tr> <tr> <td class="h" > <a name="3299">3299</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3300">3300</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # open(STDERR, ">&SAVEERR") or warn("Cannot restore STDERR: $!\n"); </td> </tr> <tr> <td class="h" > <a name="3301">3301</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> *SAVEERR = $self->{'saveerr'}; </td> </tr> <tr> <td class="h" > <a name="3302">3302</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3302-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> open(STDERR, ">&SAVEERR") or warn("Cannot restore STDERR: $!\n"); </td> </tr> <tr> <td class="h" > <a name="3303">3303</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3304">3304</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3304-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($@) </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3305">3305</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> {die "$@"} </td> </tr> <tr> <td class="h" > <a name="3306">3306</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3307">3307</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # if also capturing stdout </td> </tr> <tr> <td class="h" > <a name="3308">3308</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3308-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($self->{'stdoutdata'}) { </td> </tr> <tr> <td class="h" > <a name="3309">3309</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> undef $self->{'capstd'}; # as documented in "perltie" </td> </tr> <tr> <td class="h" > <a name="3310">3310</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3310-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> untie(*STDOUT) or warn("Cannot untie STDOUT: $!\n"); </td> </tr> <tr> <td class="h" > <a name="3311">3311</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3312">3312</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> *SAVESTD = $self->{'savestd'}; </td> </tr> <tr> <td class="h" > <a name="3313">3313</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3313-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> open(STDOUT, ">&SAVESTD") or warn("Cannot restore STDOUT: $!\n"); </td> </tr> <tr> <td class="h" > <a name="3314">3314</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3315">3315</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3315-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($@) </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3316">3316</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> {die "$@"} </td> </tr> <tr> <td class="h" > <a name="3317">3317</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3318">3318</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3319">3319</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # release handles </td> </tr> <tr> <td class="h" > <a name="3320">3320</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3321">3321</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3322">3322</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3323">3323</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3324">3324</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # display data </td> </tr> <tr> <td class="h" > <a name="3325">3325</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3326">3326</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3326-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($self->{'stderrfirst'}) { </td> </tr> <tr> <td class="h" > <a name="3327">3327</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # put STDOUT into string </td> </tr> <tr> <td class="h" > <a name="3328">3328</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $stdout = join('', @{$self->{'stdoutdata'}->{'str'}}); </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3329">3329</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3330">3330</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # if HTML </td> </tr> <tr> <td class="h" > <a name="3331">3331</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3331-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($self->{'html'}) { </td> </tr> <tr> <td class="h" > <a name="3332">3332</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my ($borders); </td> </tr> <tr> <td class="h" > <a name="3333">3333</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3334">3334</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # pull out headers </td> </tr> <tr> <td class="h" > <a name="3335">3335</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # this part is a little kludgy </td> </tr> <tr> <td class="h" > <a name="3336">3336</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # I couldn't get the split on the following line </td> </tr> <tr> <td class="h" > <a name="3337">3337</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # to work quite right </td> </tr> <tr> <td class="h" > <a name="3338">3338</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # ($borders, $stdout) = split(m/(\r\n\r\n)/s, $stdout, 2); </td> </tr> <tr> <td class="h" > <a name="3339">3339</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $borders = $stdout; </td> </tr> <tr> <td class="h" > <a name="3340">3340</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $borders =~ s/((?:\r\n\r\n)|(?:\n\n)|(?:\r\r)).*//s; </td> </tr> <tr> <td class="h" > <a name="3341">3341</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $stdout = substr($stdout, length($borders) + length($1)); </td> </tr> <tr> <td class="h" > <a name="3342">3342</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3343">3343</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # output headers </td> </tr> <tr> <td class="h" > <a name="3344">3344</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print $borders, "\n\n"; </td> </tr> <tr> <td class="h" > <a name="3345">3345</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3346">3346</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3347">3347</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # output stderr </td> </tr> <tr> <td class="h" > <a name="3348">3348</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->displaystderr; </td> </tr> <tr> <td class="h" > <a name="3349">3349</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3350">3350</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # if stdout has any content, and it doesn't end in </td> </tr> <tr> <td class="h" > <a name="3351">3351</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # a newline, add a newline </td> </tr> <tr> <td class="h" > <a name="3352">3352</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3352-1"> 0 </a> </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--condition.html#3352-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ( length($stdout) && ($stdout !~ m|[\r\n]$|) ) </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3353">3353</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> {$stdout .= "\n"} </td> </tr> <tr> <td class="h" > <a name="3354">3354</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3355">3355</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # output stdout </td> </tr> <tr> <td class="h" > <a name="3356">3356</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print $stdout; </td> </tr> <tr> <td class="h" > <a name="3357">3357</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3358">3358</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3359">3359</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # else just output STDERR </td> </tr> <tr> <td class="h" > <a name="3360">3360</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else { </td> </tr> <tr> <td class="h" > <a name="3361">3361</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->displaystderr; </td> </tr> <tr> <td class="h" > <a name="3362">3362</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3363">3363</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3364">3364</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # display data </td> </tr> <tr> <td class="h" > <a name="3365">3365</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3366">3366</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3367">3367</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3368">3368</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3369">3369</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # DESTROY </td> </tr> <tr> <td class="h" > <a name="3370">3370</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3371">3371</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3372">3372</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3373">3373</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3374">3374</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # ShowStdErr </td> </tr> <tr> <td class="h" > <a name="3375">3375</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ############################################################################### </td> </tr> <tr> <td class="h" > <a name="3376">3376</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3377">3377</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3378">3378</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3379">3379</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ############################################################################### </td> </tr> <tr> <td class="h" > <a name="3380">3380</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # HandleOb </td> </tr> <tr> <td class="h" > <a name="3381">3381</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3382">3382</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> package Debug::ShowStuff::ShowStdErr::HandleOb; </td> </tr> <tr> <td class="h" > <a name="3383">3383</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3383-1"> 1 </a> </td> <td >   </td> <td > 16 </td> <td class="s"> use strict; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 2 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 45 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3384">3384</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3384-1"> 1 </a> </td> <td >   </td> <td > 25 </td> <td class="s"> use Carp; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 3 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 1264 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3385">3385</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3386">3386</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3387">3387</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub TIEHANDLE { </td> </tr> <tr> <td class="h" > <a name="3388">3388</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3388-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> my($class, $data, %opts) = @_; </td> </tr> <tr> <td class="h" > <a name="3389">3389</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $self= bless( {} , $class); </td> </tr> <tr> <td class="h" > <a name="3390">3390</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3391">3391</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{'croakonerr'} = $opts{'croakonerr'}; </td> </tr> <tr> <td class="h" > <a name="3392">3392</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{'data'} = $data; </td> </tr> <tr> <td class="h" > <a name="3393">3393</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3394">3394</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return($self); </td> </tr> <tr> <td class="h" > <a name="3395">3395</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3396">3396</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3397">3397</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub WRITE { </td> </tr> <tr> <td class="h" > <a name="3398">3398</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3398-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> my($self, $buf, $len, $offset) = @_; </td> </tr> <tr> <td class="h" > <a name="3399">3399</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> push @{$self->{'data'}->{'str'}}, $buf; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3400">3400</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return 1; </td> </tr> <tr> <td class="h" > <a name="3401">3401</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3402">3402</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3403">3403</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub PRINT { </td> </tr> <tr> <td class="h" > <a name="3404">3404</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3404-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> my $self = shift; </td> </tr> <tr> <td class="h" > <a name="3405">3405</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3406">3406</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # croak if necessary </td> </tr> <tr> <td class="h" > <a name="3407">3407</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3407-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($self->{'croakonerr'}) </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3408">3408</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> {croak @_} </td> </tr> <tr> <td class="h" > <a name="3409">3409</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3410">3410</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> push @{$self->{'data'}->{'str'}}, @_; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3411">3411</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3412">3412</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return 1; </td> </tr> <tr> <td class="h" > <a name="3413">3413</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3414">3414</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3415">3415</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub PRINTF { </td> </tr> <tr> <td class="h" > <a name="3416">3416</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3416-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> my $self = shift; </td> </tr> <tr> <td class="h" > <a name="3417">3417</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $fmt = shift; </td> </tr> <tr> <td class="h" > <a name="3418">3418</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3419">3419</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # $self->{'data'}->{'str'} .= sprintf($fmt, @_); </td> </tr> <tr> <td class="h" > <a name="3420">3420</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> push @{$self->{'data'}->{'str'}}, sprintf($fmt, @_); </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3421">3421</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3422">3422</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3423">3423</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return 1; </td> </tr> <tr> <td class="h" > <a name="3424">3424</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3425">3425</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3426">3426</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3426-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> sub AUTOLOAD { </td> </tr> <tr> <td class="h" > <a name="3427">3427</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3428">3428</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3429">3429</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub readwarning { </td> </tr> <tr> <td class="h" > <a name="3430">3430</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3430-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> carp "Cannot read from specified filehandle."; </td> </tr> <tr> <td class="h" > <a name="3431">3431</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3432">3432</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3433">3433</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3434">3434</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # HandleOb </td> </tr> <tr> <td class="h" > <a name="3435">3435</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ############################################################################### </td> </tr> <tr> <td class="h" > <a name="3436">3436</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3437">3437</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3438">3438</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3439">3439</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ############################################################################### </td> </tr> <tr> <td class="h" > <a name="3440">3440</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # CloseGlobalHandle </td> </tr> <tr> <td class="h" > <a name="3441">3441</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3442">3442</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # Private function. </td> </tr> <tr> <td class="h" > <a name="3443">3443</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # Objects in this class automatically undefs Debug::ShowStuff::out if it is </td> </tr> <tr> <td class="h" > <a name="3444">3444</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # a FileHandle object; </td> </tr> <tr> <td class="h" > <a name="3445">3445</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3446">3446</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # Objects in this class are used by the function output_to_file(). </td> </tr> <tr> <td class="h" > <a name="3447">3447</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3448">3448</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> package Debug::ShowStuff::CloseGlobalHandle; </td> </tr> <tr> <td class="h" > <a name="3449">3449</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3449-1"> 1 </a> </td> <td >   </td> <td > 9 </td> <td class="s"> use strict; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 3 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 225 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3450">3450</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # use Carp; </td> </tr> <tr> <td class="h" > <a name="3451">3451</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3452">3452</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3453">3453</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # new </td> </tr> <tr> <td class="h" > <a name="3454">3454</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3455">3455</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub new { </td> </tr> <tr> <td class="h" > <a name="3456">3456</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3456-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> my ($class, $fh) = @_; </td> </tr> <tr> <td class="h" > <a name="3457">3457</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $self = bless {}, $class; </td> </tr> <tr> <td class="h" > <a name="3458">3458</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3459">3459</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{'fh'} = $fh; </td> </tr> <tr> <td class="h" > <a name="3460">3460</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return $self; </td> </tr> <tr> <td class="h" > <a name="3461">3461</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3462">3462</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3463">3463</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # new </td> </tr> <tr> <td class="h" > <a name="3464">3464</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3465">3465</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3466">3466</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3467">3467</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3468">3468</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # DESTROY </td> </tr> <tr> <td class="h" > <a name="3469">3469</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3470">3470</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> DESTROY { </td> </tr> <tr> <td class="h" > <a name="3471">3471</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3471-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> my ($self) = @_; </td> </tr> <tr> <td class="h" > <a name="3472">3472</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $global = $Debug::ShowStuff::out; </td> </tr> <tr> <td class="h" > <a name="3473">3473</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3474">3474</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # if the global output filehandle still exists </td> </tr> <tr> <td class="h" > <a name="3475">3475</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3475-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($global) { </td> </tr> <tr> <td class="h" > <a name="3476">3476</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3477">3477</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # if it's a filehandle object </td> </tr> <tr> <td class="h" > <a name="3478">3478</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3478-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ( UNIVERSAL::isa($global, 'FileHandle') ) { </td> </tr> <tr> <td class="h" > <a name="3479">3479</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3480">3480</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # if it's the same filehandle object as this object references </td> </tr> <tr> <td class="h" > <a name="3481">3481</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3481-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($global == $self->{'fh'}) { </td> </tr> <tr> <td class="h" > <a name="3482">3482</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # print "closing $global\n"; </td> </tr> <tr> <td class="h" > <a name="3483">3483</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3484">3484</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> undef $global; </td> </tr> <tr> <td class="h" > <a name="3485">3485</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> undef $Debug::ShowStuff::out; </td> </tr> <tr> <td class="h" > <a name="3486">3486</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Debug::ShowStuff::setoutput('stdout'); </td> </tr> <tr> <td class="h" > <a name="3487">3487</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3488">3488</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3489">3489</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3490">3490</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3491">3491</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3492">3492</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3493">3493</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # DESTROY </td> </tr> <tr> <td class="h" > <a name="3494">3494</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3495">3495</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3496">3496</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3497">3497</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3498">3498</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3499">3499</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # CloseGlobalHandle </td> </tr> <tr> <td class="h" > <a name="3500">3500</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ############################################################################### </td> </tr> <tr> <td class="h" > <a name="3501">3501</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3502">3502</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3503">3503</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3504">3504</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ############################################################################### </td> </tr> <tr> <td class="h" > <a name="3505">3505</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # Indent </td> </tr> <tr> <td class="h" > <a name="3506">3506</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3507">3507</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # An object in this class for the purpose of decrementing the current </td> </tr> <tr> <td class="h" > <a name="3508">3508</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # indent level when it is destroyed. On destruction is decrements </td> </tr> <tr> <td class="h" > <a name="3509">3509</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # $Debug::ShowStuff::indent_level. </td> </tr> <tr> <td class="h" > <a name="3510">3510</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3511">3511</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> package Debug::ShowStuff::Indent; </td> </tr> <tr> <td class="h" > <a name="3512">3512</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3512-1"> 1 </a> </td> <td >   </td> <td > 6 </td> <td class="s"> use strict; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 2 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 222 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3513">3513</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3514">3514</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3515">3515</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #--------------------------------------------------------------------------- </td> </tr> <tr> <td class="h" > <a name="3516">3516</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # new </td> </tr> <tr> <td class="h" > <a name="3517">3517</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3518">3518</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub new { </td> </tr> <tr> <td class="h" > <a name="3519">3519</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3519-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> my ($class, %opts) = @_; </td> </tr> <tr> <td class="h" > <a name="3520">3520</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my ($increment); </td> </tr> <tr> <td class="h" > <a name="3521">3521</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3522">3522</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3522-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (defined $opts{'title'}) { </td> </tr> <tr> <td class="h" > <a name="3523">3523</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $Debug::ShowStuff::indent_level++; </td> </tr> <tr> <td class="h" > <a name="3524">3524</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Debug::ShowStuff::println($opts{'title'}); </td> </tr> <tr> <td class="h" > <a name="3525">3525</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $increment = 2; </td> </tr> <tr> <td class="h" > <a name="3526">3526</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3527">3527</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else { </td> </tr> <tr> <td class="h" > <a name="3528">3528</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $increment = 1; </td> </tr> <tr> <td class="h" > <a name="3529">3529</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3530">3530</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3531">3531</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # increment indent level </td> </tr> <tr> <td class="h" > <a name="3532">3532</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $Debug::ShowStuff::indent_level++; </td> </tr> <tr> <td class="h" > <a name="3533">3533</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3534">3534</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $indent = bless({increment=>$increment, %opts}, $class); </td> </tr> <tr> <td class="h" > <a name="3535">3535</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return $indent; </td> </tr> <tr> <td class="h" > <a name="3536">3536</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3537">3537</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3538">3538</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # new </td> </tr> <tr> <td class="h" > <a name="3539">3539</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #--------------------------------------------------------------------------- </td> </tr> <tr> <td class="h" > <a name="3540">3540</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3541">3541</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3542">3542</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3543">3543</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # DESTROY </td> </tr> <tr> <td class="h" > <a name="3544">3544</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3545">3545</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> DESTROY { </td> </tr> <tr> <td class="h" > <a name="3546">3546</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3546-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> my ($self) = @_; </td> </tr> <tr> <td class="h" > <a name="3547">3547</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3548">3548</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # add bottom space if necessary </td> </tr> <tr> <td class="h" > <a name="3549">3549</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3549-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($self->{'bottom_space'}) </td> </tr> <tr> <td class="h" > <a name="3550">3550</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { Debug::ShowStuff::println() } </td> </tr> <tr> <td class="h" > <a name="3551">3551</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3552">3552</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3552-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($Debug::ShowStuff::indent_level > 0 ) { </td> </tr> <tr> <td class="h" > <a name="3553">3553</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # $Debug::ShowStuff::indent_level--; </td> </tr> <tr> <td class="h" > <a name="3554">3554</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $Debug::ShowStuff::indent_level -= $self->{'increment'}; </td> </tr> <tr> <td class="h" > <a name="3555">3555</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3556">3556</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3557">3557</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3558">3558</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # DESTROY </td> </tr> <tr> <td class="h" > <a name="3559">3559</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3560">3560</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3561">3561</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3562">3562</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3563">3563</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # CloseIndent </td> </tr> <tr> <td class="h" > <a name="3564">3564</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ############################################################################### </td> </tr> <tr> <td class="h" > <a name="3565">3565</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3566">3566</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3567">3567</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3568">3568</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ############################################################################### </td> </tr> <tr> <td class="h" > <a name="3569">3569</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # Timer </td> </tr> <tr> <td class="h" > <a name="3570">3570</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3571">3571</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # An object in this class for the purpose of showing the amount of time </td> </tr> <tr> <td class="h" > <a name="3572">3572</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # something took to run. When the object is initialized it notes the current </td> </tr> <tr> <td class="h" > <a name="3573">3573</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # time. When it is destroyed it displays the number of seconds between when </td> </tr> <tr> <td class="h" > <a name="3574">3574</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # it was created and when it was destroyed. </td> </tr> <tr> <td class="h" > <a name="3575">3575</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3576">3576</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> package Debug::ShowStuff::Timer; </td> </tr> <tr> <td class="h" > <a name="3577">3577</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3577-1"> 1 </a> </td> <td >   </td> <td > 5 </td> <td class="s"> use strict; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 2 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 435 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3578">3578</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3579">3579</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3580">3580</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #--------------------------------------------------------------------------- </td> </tr> <tr> <td class="h" > <a name="3581">3581</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # new </td> </tr> <tr> <td class="h" > <a name="3582">3582</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3583">3583</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub new { </td> </tr> <tr> <td class="h" > <a name="3584">3584</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3584-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> my ($class, %opts) = @_; </td> </tr> <tr> <td class="h" > <a name="3585">3585</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my ($timer, $init_title); </td> </tr> <tr> <td class="h" > <a name="3586">3586</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3587">3587</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # default options </td> </tr> <tr> <td class="h" > <a name="3588">3588</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> %opts = (init_title=>1, %opts); </td> </tr> <tr> <td class="h" > <a name="3589">3589</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3590">3590</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # create timer object </td> </tr> <tr> <td class="h" > <a name="3591">3591</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $timer = bless({%opts}, $class); </td> </tr> <tr> <td class="h" > <a name="3592">3592</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3593">3593</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # hold on to start time </td> </tr> <tr> <td class="h" > <a name="3594">3594</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $timer->{'start'} = time(); </td> </tr> <tr> <td class="h" > <a name="3595">3595</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3596">3596</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # silence on destruction </td> </tr> <tr> <td class="h" > <a name="3597">3597</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $timer->{'silence'} = $opts{'silence'}; </td> </tr> <tr> <td class="h" > <a name="3598">3598</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3599">3599</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # note beginning of duration </td> </tr> <tr> <td class="h" > <a name="3600">3600</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3600-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($opts{'init_title'}) { </td> </tr> <tr> <td class="h" > <a name="3601">3601</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3601-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (defined $timer->{'title'}) { </td> </tr> <tr> <td class="h" > <a name="3602">3602</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Debug::ShowStuff::println('start timer - ', $timer->{'title'}); </td> </tr> <tr> <td class="h" > <a name="3603">3603</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3604">3604</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else { </td> </tr> <tr> <td class="h" > <a name="3605">3605</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Debug::ShowStuff::println('start timer'); </td> </tr> <tr> <td class="h" > <a name="3606">3606</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3607">3607</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3608">3608</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3609">3609</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # return </td> </tr> <tr> <td class="h" > <a name="3610">3610</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return $timer; </td> </tr> <tr> <td class="h" > <a name="3611">3611</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3612">3612</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3613">3613</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # new </td> </tr> <tr> <td class="h" > <a name="3614">3614</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #--------------------------------------------------------------------------- </td> </tr> <tr> <td class="h" > <a name="3615">3615</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3616">3616</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3617">3617</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #--------------------------------------------------------------------------- </td> </tr> <tr> <td class="h" > <a name="3618">3618</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # elapsed </td> </tr> <tr> <td class="h" > <a name="3619">3619</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3620">3620</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub elapsed { </td> </tr> <tr> <td class="h" > <a name="3621">3621</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3621-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> my ($timer) = @_; </td> </tr> <tr> <td class="h" > <a name="3622">3622</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return time() - $timer->{'start'}; </td> </tr> <tr> <td class="h" > <a name="3623">3623</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3624">3624</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3625">3625</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # elapsed </td> </tr> <tr> <td class="h" > <a name="3626">3626</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #--------------------------------------------------------------------------- </td> </tr> <tr> <td class="h" > <a name="3627">3627</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3628">3628</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3629">3629</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #--------------------------------------------------------------------------- </td> </tr> <tr> <td class="h" > <a name="3630">3630</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # message </td> </tr> <tr> <td class="h" > <a name="3631">3631</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3632">3632</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub message { </td> </tr> <tr> <td class="h" > <a name="3633">3633</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3633-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> my ($timer) = @_; </td> </tr> <tr> <td class="h" > <a name="3634">3634</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my ($duration, $seconds, $rv); </td> </tr> <tr> <td class="h" > <a name="3635">3635</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3636">3636</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # get duration </td> </tr> <tr> <td class="h" > <a name="3637">3637</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $duration = time() - $timer->{'start'}; </td> </tr> <tr> <td class="h" > <a name="3638">3638</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3639">3639</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # second or seconds </td> </tr> <tr> <td class="h" > <a name="3640">3640</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3640-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($duration == 1) </td> </tr> <tr> <td class="h" > <a name="3641">3641</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { $seconds = 'second' } </td> </tr> <tr> <td class="h" > <a name="3642">3642</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else </td> </tr> <tr> <td class="h" > <a name="3643">3643</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { $seconds = 'seconds' } </td> </tr> <tr> <td class="h" > <a name="3644">3644</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3645">3645</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # note beginning of duration </td> </tr> <tr> <td class="h" > <a name="3646">3646</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3646-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (defined $timer->{'title'}) { </td> </tr> <tr> <td class="h" > <a name="3647">3647</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $rv = </td> </tr> <tr> <td class="h" > <a name="3648">3648</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> 'duration - ' . </td> </tr> <tr> <td class="h" > <a name="3649">3649</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $timer->{'title'} . </td> </tr> <tr> <td class="h" > <a name="3650">3650</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ': ' . </td> </tr> <tr> <td class="h" > <a name="3651">3651</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $duration . </td> </tr> <tr> <td class="h" > <a name="3652">3652</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ' seconds'; </td> </tr> <tr> <td class="h" > <a name="3653">3653</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3654">3654</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> else { </td> </tr> <tr> <td class="h" > <a name="3655">3655</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $rv = </td> </tr> <tr> <td class="h" > <a name="3656">3656</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> 'duration : ' . </td> </tr> <tr> <td class="h" > <a name="3657">3657</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $duration . </td> </tr> <tr> <td class="h" > <a name="3658">3658</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ' ' . </td> </tr> <tr> <td class="h" > <a name="3659">3659</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $seconds; </td> </tr> <tr> <td class="h" > <a name="3660">3660</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3661">3661</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3662">3662</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # return </td> </tr> <tr> <td class="h" > <a name="3663">3663</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return $rv; </td> </tr> <tr> <td class="h" > <a name="3664">3664</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3665">3665</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3666">3666</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # message </td> </tr> <tr> <td class="h" > <a name="3667">3667</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #--------------------------------------------------------------------------- </td> </tr> <tr> <td class="h" > <a name="3668">3668</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3669">3669</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3670">3670</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #--------------------------------------------------------------------------- </td> </tr> <tr> <td class="h" > <a name="3671">3671</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # silence </td> </tr> <tr> <td class="h" > <a name="3672">3672</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3673">3673</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub silence { </td> </tr> <tr> <td class="h" > <a name="3674">3674</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3674-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> my ($timer) = @_; </td> </tr> <tr> <td class="h" > <a name="3675">3675</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $timer->{'silence'} = 1; </td> </tr> <tr> <td class="h" > <a name="3676">3676</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3677">3677</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3678">3678</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # silence </td> </tr> <tr> <td class="h" > <a name="3679">3679</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #--------------------------------------------------------------------------- </td> </tr> <tr> <td class="h" > <a name="3680">3680</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3681">3681</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3682">3682</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3683">3683</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # DESTROY </td> </tr> <tr> <td class="h" > <a name="3684">3684</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3685">3685</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> DESTROY { </td> </tr> <tr> <td class="h" > <a name="3686">3686</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3686-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> my ($timer) = @_; </td> </tr> <tr> <td class="h" > <a name="3687">3687</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3688">3688</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # only output info if the 'silence' property is false </td> </tr> <tr> <td class="h" > <a name="3689">3689</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3689-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (! $timer->{'silence'}) { </td> </tr> <tr> <td class="h" > <a name="3690">3690</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Debug::ShowStuff::println($timer->message()); </td> </tr> <tr> <td class="h" > <a name="3691">3691</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3692">3692</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3693">3693</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3694">3694</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # DESTROY </td> </tr> <tr> <td class="h" > <a name="3695">3695</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3696">3696</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3697">3697</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3698">3698</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3699">3699</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # Timer </td> </tr> <tr> <td class="h" > <a name="3700">3700</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ############################################################################### </td> </tr> <tr> <td class="h" > <a name="3701">3701</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3702">3702</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3703">3703</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ############################################################################### </td> </tr> <tr> <td class="h" > <a name="3704">3704</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # TempShowStuff </td> </tr> <tr> <td class="h" > <a name="3705">3705</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3706">3706</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> package Debug::ShowStuff::TempShowStuff; </td> </tr> <tr> <td class="h" > <a name="3707">3707</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3707-1"> 1 </a> </td> <td >   </td> <td > 7 </td> <td class="s"> use strict; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 2 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 139 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3708">3708</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3709">3709</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3710">3710</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3711">3711</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # new </td> </tr> <tr> <td class="h" > <a name="3712">3712</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3713">3713</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub new { </td> </tr> <tr> <td class="h" > <a name="3714">3714</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3714-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> my ($class, $set) = @_; </td> </tr> <tr> <td class="h" > <a name="3715">3715</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $self = bless {}, $class; </td> </tr> <tr> <td class="h" > <a name="3716">3716</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3717">3717</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # get current state </td> </tr> <tr> <td class="h" > <a name="3718">3718</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $self->{'org'} = $Debug::ShowStuff::active; </td> </tr> <tr> <td class="h" > <a name="3719">3719</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3720">3720</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # turn showstuff off </td> </tr> <tr> <td class="h" > <a name="3721">3721</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Debug::ShowStuff::showstuff($set); </td> </tr> <tr> <td class="h" > <a name="3722">3722</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3723">3723</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # return </td> </tr> <tr> <td class="h" > <a name="3724">3724</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return $self; </td> </tr> <tr> <td class="h" > <a name="3725">3725</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3726">3726</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3727">3727</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # new </td> </tr> <tr> <td class="h" > <a name="3728">3728</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3729">3729</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3730">3730</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3731">3731</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3732">3732</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # DESTROY </td> </tr> <tr> <td class="h" > <a name="3733">3733</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3734">3734</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub DESTROY { </td> </tr> <tr> <td class="h" > <a name="3735">3735</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3735-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> my ($self) = @_; </td> </tr> <tr> <td class="h" > <a name="3736">3736</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3737">3737</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # turn showstuff off </td> </tr> <tr> <td class="h" > <a name="3738">3738</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Debug::ShowStuff::showstuff($self->{'org'}); </td> </tr> <tr> <td class="h" > <a name="3739">3739</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3740">3740</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3741">3741</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # DESTROY </td> </tr> <tr> <td class="h" > <a name="3742">3742</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3743">3743</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3744">3744</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3745">3745</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3746">3746</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # TempShowStuff </td> </tr> <tr> <td class="h" > <a name="3747">3747</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ############################################################################### </td> </tr> <tr> <td class="h" > <a name="3748">3748</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3749">3749</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3750">3750</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ############################################################################### </td> </tr> <tr> <td class="h" > <a name="3751">3751</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # Debug::ShowStuff::SeparatePrint </td> </tr> <tr> <td class="h" > <a name="3752">3752</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3753">3753</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> package Debug::ShowStuff::SeparatePrint; </td> </tr> <tr> <td class="h" > <a name="3754">3754</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3754-1"> 1 </a> </td> <td >   </td> <td > 5 </td> <td class="s"> use strict; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 2 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 34 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3755">3755</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3755-1"> 1 </a> </td> <td >   </td> <td > 1412 </td> <td class="s"> use IO::Handle; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 18647 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 172 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3756">3756</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3756-1"> 1 </a> </td> <td >   </td> <td > 1562 </td> <td class="s"> use IO::Seekable; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 808 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 70 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3757">3757</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3757-1"> 1 </a> </td> <td >   </td> <td > 10 </td> <td class="s"> use Symbol; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 3 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 209 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3758">3758</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3758-1"> 1 </a> </td> <td >   </td> <td > 8 </td> <td class="s"> use Carp 'croak'; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 2 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 221 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3759">3759</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3760">3760</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3761">3761</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #-------------------------------------------------------------------------------------- </td> </tr> <tr> <td class="h" > <a name="3762">3762</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # new </td> </tr> <tr> <td class="h" > <a name="3763">3763</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3764">3764</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub new { </td> </tr> <tr> <td class="h" > <a name="3765">3765</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3765-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> my($class, $path, %opts) = @_; </td> </tr> <tr> <td class="h" > <a name="3766">3766</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $fh = gensym; </td> </tr> <tr> <td class="h" > <a name="3767">3767</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3768">3768</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # must have path </td> </tr> <tr> <td class="h" > <a name="3769">3769</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3769-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if (! defined $path) </td> </tr> <tr> <td class="h" > <a name="3770">3770</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> { croak "Debug::ShowStuff::SeparatePrint->new must have file path" } </td> </tr> <tr> <td class="h" > <a name="3771">3771</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3772">3772</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # tie handle </td> </tr> <tr> <td class="h" > <a name="3773">3773</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ${*$fh} = tie *$fh, "${class}::Tie", $path; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3774">3774</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> bless $fh, $class; </td> </tr> <tr> <td class="h" > <a name="3775">3775</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3776">3776</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # if "new" parameter is sent and is true, wipe out any existing contents </td> </tr> <tr> <td class="h" > <a name="3777">3777</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # in the output path </td> </tr> <tr> <td class="h" > <a name="3778">3778</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3778-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> if ($opts{'new'}) { </td> </tr> <tr> <td class="h" > <a name="3779">3779</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3779-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> FileHandle->new("> $path") or die $!; </td> </tr> <tr> <td class="h" > <a name="3780">3780</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3781">3781</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3782">3782</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # return </td> </tr> <tr> <td class="h" > <a name="3783">3783</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return $fh; </td> </tr> <tr> <td class="h" > <a name="3784">3784</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3785">3785</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3786">3786</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # new </td> </tr> <tr> <td class="h" > <a name="3787">3787</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #-------------------------------------------------------------------------------------- </td> </tr> <tr> <td class="h" > <a name="3788">3788</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3789">3789</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3790">3790</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3791">3791</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # Debug::ShowStuff::SeparatePrint </td> </tr> <tr> <td class="h" > <a name="3792">3792</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ############################################################################### </td> </tr> <tr> <td class="h" > <a name="3793">3793</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3794">3794</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3795">3795</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3796">3796</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ############################################################################### </td> </tr> <tr> <td class="h" > <a name="3797">3797</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # Debug::ShowStuff::SeparatePrint::Tie </td> </tr> <tr> <td class="h" > <a name="3798">3798</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3799">3799</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> package Debug::ShowStuff::SeparatePrint::Tie; </td> </tr> <tr> <td class="h" > <a name="3800">3800</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3800-1"> 1 </a> </td> <td >   </td> <td > 7 </td> <td class="s"> use strict; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 1 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 33 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3801">3801</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3801-1"> 1 </a> </td> <td >   </td> <td > 6 </td> <td class="s"> use IO::Seekable; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 1 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 153 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3802">3802</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3802-1"> 1 </a> </td> <td >   </td> <td > 1333 </td> <td class="s"> use FileHandle; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 4083 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 12 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3803">3803</a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td class="c3" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3803-1"> 1 </a> </td> <td >   </td> <td > 769 </td> <td class="s"> use Fcntl ':mode', ':flock'; </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 3 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a > </a> </td> <td class="c3" > 1 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td > 1241 </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3804">3804</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3805">3805</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3806">3806</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3807">3807</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # TIEHANDLE </td> </tr> <tr> <td class="h" > <a name="3808">3808</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3809">3809</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub TIEHANDLE { </td> </tr> <tr> <td class="h" > <a name="3810">3810</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3810-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> my($class, $path) = @_; </td> </tr> <tr> <td class="h" > <a name="3811">3811</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $handle = bless({}, $class); </td> </tr> <tr> <td class="h" > <a name="3812">3812</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3813">3813</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # hold on to path </td> </tr> <tr> <td class="h" > <a name="3814">3814</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $handle->{'path'} = $path; </td> </tr> <tr> <td class="h" > <a name="3815">3815</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3816">3816</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # return </td> </tr> <tr> <td class="h" > <a name="3817">3817</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return $handle; </td> </tr> <tr> <td class="h" > <a name="3818">3818</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3819">3819</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3820">3820</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # TIEHANDLE </td> </tr> <tr> <td class="h" > <a name="3821">3821</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3822">3822</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3823">3823</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3824">3824</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3825">3825</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # don't use these methods </td> </tr> <tr> <td class="h" > <a name="3826">3826</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # This type of file handle is for printing only, so none of the following </td> </tr> <tr> <td class="h" > <a name="3827">3827</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # methods make sense to use and should notify the programming as such. </td> </tr> <tr> <td class="h" > <a name="3828">3828</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3829">3829</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3829-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> sub READLINE { die "FileHandle::Separate::Tie is for printing only" } </td> </tr> <tr> <td class="h" > <a name="3830">3830</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3830-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> sub READ { die "FileHandle::Separate::Tie is for printing only" } </td> </tr> <tr> <td class="h" > <a name="3831">3831</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3831-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> sub GETC { die "FileHandle::Separate::Tie is for printing only" } </td> </tr> <tr> <td class="h" > <a name="3832">3832</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3832-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> sub WRITE { die "FileHandle::Separate::Tie is for printing only" } </td> </tr> <tr> <td class="h" > <a name="3833">3833</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3833-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> sub TELL { die "FileHandle::Separate::Tie is for printing only" } </td> </tr> <tr> <td class="h" > <a name="3834">3834</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3834-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> sub SEEK { die "FileHandle::Separate::Tie is for printing only" } </td> </tr> <tr> <td class="h" > <a name="3835">3835</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3836">3836</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # don't use these methods </td> </tr> <tr> <td class="h" > <a name="3837">3837</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3838">3838</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3839">3839</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3840">3840</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3841">3841</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # these methods have no effect, but aren't harmful to use </td> </tr> <tr> <td class="h" > <a name="3842">3842</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3843">3843</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3843-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> sub FLOCK {} </td> </tr> <tr> <td class="h" > <a name="3844">3844</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3844-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> sub BINMODE {} </td> </tr> <tr> <td class="h" > <a name="3845">3845</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3845-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> sub CLOSE {} </td> </tr> <tr> <td class="h" > <a name="3846">3846</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3847">3847</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # these methods have no effect, but aren't harmful to use </td> </tr> <tr> <td class="h" > <a name="3848">3848</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3849">3849</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3850">3850</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3851">3851</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3852">3852</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # PRINT </td> </tr> <tr> <td class="h" > <a name="3853">3853</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3854">3854</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub PRINT { </td> </tr> <tr> <td class="h" > <a name="3855">3855</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3855-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> my ($handle, @data) = @_; </td> </tr> <tr> <td class="h" > <a name="3856">3856</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my ($out); </td> </tr> <tr> <td class="h" > <a name="3857">3857</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3858">3858</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # open file handle </td> </tr> <tr> <td class="h" > <a name="3859">3859</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3859-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $out = FileHandle->new(">> $handle->{'path'}") or </td> </tr> <tr> <td class="h" > <a name="3860">3860</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> die "unable to open filehandle: $!"; </td> </tr> <tr> <td class="h" > <a name="3861">3861</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3862">3862</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # get exclusive lock </td> </tr> <tr> <td class="h" > <a name="3863">3863</a> </td> <td class="c0" > 0 </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--branch.html#3863-1"> 0 </a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> flock($out, LOCK_EX) or </td> </tr> <tr> <td class="h" > <a name="3864">3864</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> die "unable to lock file: $!"; </td> </tr> <tr> <td class="h" > <a name="3865">3865</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3866">3866</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # seek end of file </td> </tr> <tr> <td class="h" > <a name="3867">3867</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $out->seek(0, SEEK_END); </td> </tr> <tr> <td class="h" > <a name="3868">3868</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> </td> </tr> <tr> <td class="h" > <a name="3869">3869</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # output </td> </tr> <tr> <td class="h" > <a name="3870">3870</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> print $out @data; </td> </tr> <tr> <td class="h" > <a name="3871">3871</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3872">3872</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3873">3873</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # PRINT </td> </tr> <tr> <td class="h" > <a name="3874">3874</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3875">3875</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3876">3876</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3877">3877</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3878">3878</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # PRINTF </td> </tr> <tr> <td class="h" > <a name="3879">3879</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3880">3880</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> sub PRINTF { </td> </tr> <tr> <td class="h" > <a name="3881">3881</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td class="c0" > <a href="blib-lib-Debug-ShowStuff-pm--subroutine.html#3881-1"> 0 </a> </td> <td >   </td> <td >   </td> <td class="s"> my $self = shift; </td> </tr> <tr> <td class="h" > <a name="3882">3882</a> </td> <td class="c0" > 0 </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> return $self->PRINT(sprintf( shift, @_ )); </td> </tr> <tr> <td class="h" > <a name="3883">3883</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> } </td> </tr> <tr> <td class="h" > <a name="3884">3884</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3885">3885</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # PRINTF </td> </tr> <tr> <td class="h" > <a name="3886">3886</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> #------------------------------------------------ </td> </tr> <tr> <td class="h" > <a name="3887">3887</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3888">3888</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3889">3889</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # </td> </tr> <tr> <td class="h" > <a name="3890">3890</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # Debug::ShowStuff::SeparatePrint::Tie </td> </tr> <tr> <td class="h" > <a name="3891">3891</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ############################################################################### </td> </tr> <tr> <td class="h" > <a name="3892">3892</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3893">3893</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="3894">3894</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> # return true </td> </tr> <tr> <td class="h" > <a name="3895">3895</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> 1; </td> </tr> <tr> <td class="h" > <a name="3896">3896</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> __END__ </td> </tr> </table> </body> </html>