From: Ilya Zakharevich Date: Wed, 16 Jun 1999 14:57:22 +0000 (-0400) Subject: Devel::Peek X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a423dfddc0d829510a4dbcb9030a800ac026fa9c;p=p5sagit%2Fp5-mst-13.2.git Devel::Peek Message-ID: <19990616145722.B16258@monk.mps.ohio-state.edu> p4raw-id: //depot/perl@3623 --- diff --git a/ext/Devel/Peek/Peek.pm b/ext/Devel/Peek/Peek.pm index 026c976..7b3cf74 100644 --- a/ext/Devel/Peek/Peek.pm +++ b/ext/Devel/Peek/Peek.pm @@ -57,7 +57,8 @@ C. Devel::Peek also supplies C, C, and C which can query, increment, and decrement reference counts on SVs. This document will take a passive, and safe, approach to data debugging and for that it will describe only the C -function. +function. For format of output of mstats() see +L>. Function C allows dumping of multiple values (useful when you need to analize returns of functions). @@ -83,7 +84,7 @@ expect to see it well-thumbed. Let's begin by looking a simple scalar which is holding a string. - use Devel::Peek 'Dump'; + use Devel::Peek; $a = "hello"; Dump $a; @@ -112,7 +113,7 @@ end-of-string marker). If the scalar contains a number the raw SV will be leaner. - use Devel::Peek 'Dump'; + use Devel::Peek; $a = 42; Dump $a; @@ -132,7 +133,7 @@ see what is in the scalar. If the scalar from the previous example had an extra reference: - use Devel::Peek 'Dump'; + use Devel::Peek; $a = 42; $b = \$a; Dump $a; @@ -152,7 +153,7 @@ instead of C<$a>. This shows what a reference looks like when it references a simple scalar. - use Devel::Peek 'Dump'; + use Devel::Peek; $a = 42; $b = \$a; Dump $b; @@ -183,7 +184,7 @@ address may change during lifetime of an SV. This shows what a reference to an array looks like. - use Devel::Peek 'Dump'; + use Devel::Peek; $a = [42]; Dump $a; @@ -258,7 +259,7 @@ report tree). The following shows the raw form of a reference to a hash. - use Devel::Peek 'Dump'; + use Devel::Peek; $a = {hello=>42}; Dump $a; @@ -293,7 +294,7 @@ The C function, by default, dumps up to 4 elements from a toplevel array or hash. This number can be increased by supplying a second argument to the function. - use Devel::Peek 'Dump'; + use Devel::Peek; $a = [10,11,12,13,14]; Dump $a; diff --git a/ext/Devel/Peek/Peek.xs b/ext/Devel/Peek/Peek.xs index 3119266..016a6eb 100644 --- a/ext/Devel/Peek/Peek.xs +++ b/ext/Devel/Peek/Peek.xs @@ -141,7 +141,7 @@ PPCODE: SV *dumpop = perl_get_sv("Devel::Peek::dump_ops", FALSE); I32 save_dumpindent = PL_dumpindent; PL_dumpindent = 2; - do_sv_dump(0, PerlIO_stderr(), sv, 0, 4, dumpop && SvTRUE(dumpop), pv_lim); + do_sv_dump(0, PerlIO_stderr(), sv, 0, lim, dumpop && SvTRUE(dumpop), pv_lim); PL_dumpindent = save_dumpindent; }