| 1 | package Apache::HeavyCGI::Debug; | ||
| 2 | use base 'Class::Singleton'; | ||
| 3 | use Data::Dumper; | ||
| 4 | use strict; | ||
| 5 | |||
| 6 | sub as_string { | ||
| 7 | my Apache::HeavyCGI::Debug $self = shift; | ||
| 8 | my Apache::HeavyCGI $mgr = shift; | ||
| 9 | |||
| 10 | # An AVHV is ugly to look at, so we convert to an HASH | ||
| 11 | |||
| 12 | my(%f,$k,$v); | ||
| 13 | |||
| 14 | while (($k,$v) = each %$mgr){ | ||
| 15 | next unless defined $v; | ||
| 16 | $f{$k} = $v; | ||
| 17 | } | ||
| 18 | Data::Dumper::Dumper( \%f ) | ||
| 19 | } | ||
| 20 | |||
| 21 | 1; | ||
| 22 | |||
| 23 | =head1 NAME | ||
| 24 | |||
| 25 | Apache::HeavyCGI::Debug - inspect the Pseudohash as Hash with Data::Dumper | ||
| 26 | |||
| 27 | =head1 SYNOPSIS | ||
| 28 | |||
| 29 | push @layout, "<BR><PRE>", | ||
| 30 | $self->instance_of("Apache::HeavyCGI::Debug"), | ||
| 31 | "</PRE><BR>\n"; | ||
| 32 | |||
| 33 | =head1 DESCRIPTION | ||
| 34 | |||
| 35 | Can be used to inspect the application object within an output page. | ||
| 36 | The Class is just implemented as an illustration. | ||
| 37 | |||
| 38 | =cut | ||
| 39 |