X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDumpvalue.pm;h=7944e78c963fde9b0cf27bc4a52d9989d43407a2;hb=8af3c3489f0c9ca8d37ebae27991ac4f34dfdb2f;hp=c9b1acafebb8b9b41a166f81d99c8543ff6ae9df;hpb=8f90a6c70b6a5c1aca24608b06b7deecb45f7079;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/Dumpvalue.pm b/lib/Dumpvalue.pm index c9b1aca..7944e78 100644 --- a/lib/Dumpvalue.pm +++ b/lib/Dumpvalue.pm @@ -1,7 +1,7 @@ use 5.006_001; # for (defined ref) and $#$v and our package Dumpvalue; use strict; -our $VERSION = '1.10'; +our $VERSION = '1.11'; our(%address, $stab, @stab, %stab, %subs); # documentation nits, handle complex data structures better by chromatic @@ -492,6 +492,7 @@ Dumpvalue - provides screen dump of Perl data. $dumper->set(globPrint => 1); $dumper->dumpValue(\*::); $dumper->dumpvars('main'); + my $dump = $dumper->stringify($some_value); =head1 DESCRIPTION @@ -578,10 +579,22 @@ method and set() method (which accept multiple arguments). $dumper->dumpValue($value); $dumper->dumpValue([$value1, $value2]); +Prints a dump to the currently selected filehandle. + =item dumpValues $dumper->dumpValues($value1, $value2); +Same as C< $dumper->dumpValue([$value1, $value2]); >. + +=item stringify + + my $dump = $dumper->stringify($value [,$noticks] ); + +Returns the dump of a single scalar without printing. If the second +argument is true, the return value does not contain enclosing ticks. +Does not handle data structures. + =item dumpvars $dumper->dumpvars('my_package');