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


NAME

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


SYNOPSIS

  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

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

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

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

the CGI::Carp::DebugScreen manpage


AUTHOR

Kenichi Ishigaki, <ishigaki@cpan.org>


COPYRIGHT AND LICENSE

Copyright (C) 2006 by Kenichi Ishigaki

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

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