Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

devel::dumpvar(3pm) [debian man page]

Devel::Dumpvar(3pm)					User Contributed Perl Documentation				       Devel::Dumpvar(3pm)

NAME
Devel::Dumpvar - A pure-OO reimplementation of dumpvar.pl SYNOPSIS
use Devel::Dumpvar; # Dump something immediately to STDOUT Devel::Dumpvar->dump( [ 'foo' ], $bar' ); # Create a dump handle to use repeatedly my $Dump = Devel::Dumpvar->new; # Dump via the handler $Dump->dump( 'foo', [ 'bar' ] ); DESCRIPTION
Most perl dumping modules are focused on serializing data structures into a format that can be rebuilt into the original data structure. They do this with a variety of different focuses, such as human readability, the ability to execute the dumped code directly, or to minimize the size of the dumped data. Excect for the one contained in the debugger, in the file dumpvar.pl. This is a much more human-readable form, highly useful for debugging, containing a lot of extra information without the burden of needing to allow the dump to be re-assembled into the original data. The main downside of the dumper in the perl-debugger is that the dumpvar.pl script is not really a readily loadable and useable module. It has dedicated hooks from and to the debugger, and spans across multiple namespaces, including main::. Devel::Dumpvar is a pure object-orientated reimplementation of the same functionality. This makes it much more versatile version to use for dumping information to debug log files or other uses where you don't need to reassemble the data. METHODS
new( option => value, ... ) The "new" constructor creates a new dumping object. Any options can be passed a list of key/value pairs. Each option passed to the constructor is set via one of the option methods below. to( $output_destination ) The "to" option specifies where the output is to be sent to. When undefined, output will go to STDOUT. The output destination can be either a handle object ( or anything else with a ->print method ), or the string 'return', which will cause the "dump" method to collect and return the dump results for each call, rather than printing it immediately to the output. If called without an argument, returns the current value. If called with an argument, returns true or dies on error. dump( data1, data2, ... ) If called as an object method, dumps a number of data values or structs to the dumping object. If called as a class method, creates a new default dump object and immediately dumps to it, destroying the dumper afterwards. TO DO
- Implement options currently available in other dumpers as needed. - Currently only supports SCALAR, REF, ARRAY, HASH and Regexp. Add support for all possible reference types. SUPPORT
Bugs should be reported via the CPAN bug tracker at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Devel-Dumpvar <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Devel-Dumpvar> For other issues, or commercial enhancement or support, contact the author. AUTHORS
Adam Kennedy <adamk@cpan.org> COPYRIGHT
Copyright 2004 - 2010 Adam Kennedy. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.12.4 2010-01-18 Devel::Dumpvar(3pm)

Check Out this Related Man Page

PPI::Dumper(3pm)					User Contributed Perl Documentation					  PPI::Dumper(3pm)

NAME
PPI::Dumper - Dumping of PDOM trees SYNOPSIS
# Load a document my $Module = PPI::Document->new( 'MyModule.pm' ); # Create the dumper my $Dumper = PPI::Dumper->new( $Module ); # Dump the document $Dumper->print; DESCRIPTION
The PDOM trees in PPI are quite complex, and getting a dump of their structure for development and debugging purposes is important. This module provides that functionality. The process is relatively simple. Create a dumper object with a particular set of options, and then call one of the dump methods to generate the dump content itself. METHODS
new $Element, param => value, ... The "new" constructor creates a dumper, and takes as argument a single PPI::Element object of any type to serve as the root of the tree to be dumped, and a number of key->value parameters to control the output format of the Dumper. Details of the parameters are listed below. Returns a new "PPI::Dumper" object, or "undef" if the constructor is not passed a correct PPI::Element root object. memaddr Should the dumper print the memory addresses of each PDOM element. True/false value, off by default. indent Should the structures being dumped be indented. This value is numeric, with the number representing the number of spaces to use when indenting the dumper output. Set to '2' by default. class Should the dumper print the full class for each element. True/false value, on by default. content Should the dumper show the content of each element. True/false value, on by default. whitespace Should the dumper show whitespace tokens. By not showing the copious numbers of whitespace tokens the structure of the code can often be made much clearer. True/false value, on by default. comments Should the dumper show comment tokens. In situations where you have a lot of comments, the code can often be made clearer by ignoring comment tokens. True/value value, on by default. locations Should the dumper show the location of each token. The values shown are [ line, rowchar, column ]. See "location" in PPI::Element for a description of what these values really are. True/false value, off by default. print The "print" method generates the dump and prints it to STDOUT. Returns as for the internal print function. string The "string" method generates the dump and provides it as a single string. Returns a string or undef if there is an error while generating the dump. list The "list" method generates the dump and provides it as a raw list, without trailing newlines. Returns a list or the null list if there is an error while generation the dump. SUPPORT
See the support section in the main module. AUTHOR
Adam Kennedy <adamk@cpan.org> COPYRIGHT
Copyright 2001 - 2011 Adam Kennedy. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.10.1 2011-02-26 PPI::Dumper(3pm)
Man Page