CGI::Carp::DebugScreen::Dumper - Dump a variable as an HTML table


CGI-Carp-DebugScreen documentation  | view source Contained in the CGI-Carp-DebugScreen distribution.

Index


NAME

Top

CGI::Carp::DebugScreen::Dumper - Dump a variable as an HTML table

SYNOPSIS

Top

  use CGI::Carp::DebugScreen::Dumper;

  # if you want to poke into further
  CGI::Carp::DebugScreen::Dumper->ignore_overload(1);

  my $table = CGI::Carp::DebugScreen::Dumper->dump($thingy);

  print "Content-type:text/html\n\n", $table;

DESCRIPTION

Top

This module dumps the contents of a variable (supposedly, a reference) as an HTML table. If the variable has something unfit for an HTML output, it dumps alternative texts such as '*BINARY*', '*CODE*', or '*GLOB*'. It also escapes every key and value, so all you have to do is print some headers (likely to have been printed) and the dumped table. Dead easy.

METHOD

Top

Currently this module has only two package methods.

dump()

takes a variable (supposedly, a reference) and returns an HTML table.

ignore_overload()

If set to true, dump() will ignore overloading (to stringify, maybe) and poke into the object further.

TODO

Top

I'm afraid that this module should have another (and shorter) name and stand alone. The dumps() method should take array, hash, or multiple variables.

SEE ALSO

Top

CGI::Carp::DebugScreen

AUTHOR

Top

Kenichi Ishigaki, <ishigaki@cpan.org>

COPYRIGHT AND LICENSE

Top


CGI-Carp-DebugScreen documentation  | view source Contained in the CGI-Carp-DebugScreen distribution.