dslinux/user/perl/ext/Data/Dumper Changes Dumper.pm Dumper.xs Makefile.PL Todo

cayenne dslinux_cayenne at user.in-berlin.de
Mon Dec 4 17:59:11 CET 2006


Update of /cvsroot/dslinux/dslinux/user/perl/ext/Data/Dumper
In directory antilope:/tmp/cvs-serv17422/ext/Data/Dumper

Added Files:
	Changes Dumper.pm Dumper.xs Makefile.PL Todo 
Log Message:
Adding fresh perl source to HEAD to branch from

--- NEW FILE: Changes ---
=head1 NAME

HISTORY - public release history for Data::Dumper

=head1 DESCRIPTION

=over 8

=item 2.121 (Aug 24 2003)

Backport to 5.6.1 by Ilya Martynov <ilya at martynov.org>.

=item 2.11  (unreleased)

C<0> is now dumped as such, not as C<'0'>.

qr// objects are now dumped correctly (provided a post-5.005_58)
overload.pm exists).

Implemented $Data::Dumper::Maxdepth, which was on the Todo list.
Thanks to John Nolan <jpnolan at Op.Net>.

=item 2.101 (30 Apr 1999)

Minor release to sync with version in 5.005_03.  Fixes dump of
dummy coderefs.

=item 2.10  (31 Oct 1998)

Bugfixes for dumping related undef values, globs, and better double
quoting: three patches suggested by Gisle Aas <gisle at aas.no>.

Escaping of single quotes in the XS version could get tripped up
by the presence of nulls in the string.  Fix suggested by
Slaven Rezic <eserte at cs.tu-berlin.de>.

Rather large scale reworking of the logic in how seen values
are stashed. Anonymous scalars that may be encountered while
traversing the structure are properly tracked, in case they become
used in data dumped in a later pass.  There used to be a problem
with the previous logic that prevented such structures from being
dumped correctly.

Various additions to the testsuite.

=item 2.09  (9 July 1998)

Implement $Data::Dumper::Bless, suggested by Mark Daku <daku at nortel.ca>.

=item 2.081  (15 January 1998)

Minor release to fix Makefile.PL not accepting MakeMaker args.

=item 2.08  (7 December 1997)

Glob dumps don't output superflous 'undef' anymore.

Fixes from Gisle Aas <gisle at aas.no> to make Dumper() work with
overloaded strings in recent perls, and his new testsuite.

require 5.004.

A separate flag to always quote hash keys (on by default).

Recreating known CODE refs is now better supported.

Changed flawed constant SCALAR bless workaround.

=item 2.07  (7 December 1996)

Dumpxs output is now exactly the same as Dump.  It still doesn't
honor C<Useqq> though.

Regression tests test for identical output and C<eval>-ability.

Bug in *GLOB{THING} output fixed.

Other small enhancements.

=item 2.06  (2 December 1996)

Bugfix that was serious enough for new release--the bug cripples
MLDBM.  Problem was "Attempt to modify readonly value..." failures
that stemmed for a misguided SvPV_force() instead of a SvPV().)

=item 2.05  (2 December 1996)

Fixed the type mismatch that was causing Dumpxs test to fail
on 64-bit platforms.

GLOB elements are dumped now when C<Purity> is set (using the
*GLOB{THING} syntax).

The C<Freezer> option can be set to a method name to call
before probing objects for dumping.  Some applications: objects with
external data, can re-bless themselves into a transitional package;
Objects the maintain ephemeral state (like open files) can put
additional information in the object to facilitate persistence.

The corresponding C<Toaster> option, if set, specifies
the method call that will revive the frozen object.

The C<Deepcopy> flag has been added to do just that.

Dumper does more aggressive cataloging of SCALARs encountered
within ARRAY/HASH structures. Thanks to Norman Gaywood 
<norm at godel.une.edu.au> for reporting the problem.

Objects that C<overload> the '""' operator are now handled
properly by the C<Dump> method.

Significant additions to the testsuite.

More documentation.

=item 2.04beta  (28 August 1996)

Made dump of glob names respect C<Useqq> setting.

[@$%] are now escaped now when in double quotes.

=item 2.03beta  (26 August 1996)

Fixed Dumpxs.  It was appending trailing nulls to globnames.
(reported by Randal Schwartz <merlyn at teleport.com>).

Calling the C<Indent()> method on a dumper object now correctly
resets the internal separator (reported by Curt Tilmes
<curt at ltpmail.gsfc.nasa.gov>).

New C<Terse> option to suppress the 'C<VARI<n> = >' prefix 
introduced.  If the option is set, they are output only when
absolutely essential.

The C<Useqq> flag is supported (but not by the XSUB version
yet).

Embedded nulls in keys are now handled properly by Dumpxs.

Dumper.xs now use various integer types in perl.h (should
make it compile without noises on 64 bit platforms, although
I haven't been able to test this).

All the dump methods now return a list of strings in a list
context.


=item 2.02beta  (13 April 1996)

Non portable sprintf usage in XS code fixed (thanks to 
Ulrich Pfeifer <pfeifer at charly.informatik.uni-dortmund.de>).


=item 2.01beta  (10 April 1996)

Minor bugfix (single digit numbers were always getting quoted).


=item 2.00beta  (9 April 1996)

C<Dumpxs> is now the exact XSUB equivalent of C<Dump>.  The XS version
is 4-5 times faster.

C<require 5.002>.

MLDBM example removed (as its own module, it has a separate CPAN 
reality now).

Fixed bugs in handling keys with wierd characters.  Perl can be
tripped up in its implicit quoting of the word before '=>'.  The
fix: C<Data::Dumper::Purity>, when set, always triggers quotes
around hash keys.

Andreas Koenig <k at anna.in-berlin.de> pointed out that handling octals
is busted.  His patch added.

Dead code removed, other minor documentation fixes.


=item 1.23      (3 Dec 1995)

MLDBM example added.

Several folks pointed out that quoting of ticks and backslashes 
in strings is missing. Added.

Ian Phillipps <ian at pipex.net> pointed out that numerics may lose 
precision without quotes.  Fixed.


=item 1.21     (20 Nov 1995)

Last stable version I can remember.

=back

=cut

--- NEW FILE: Dumper.pm ---
#
# Data/Dumper.pm
#
# convert perl data structures into perl syntax suitable for both printing
# and eval
#
# Documentation at the __END__
#

package Data::Dumper;

$VERSION = '2.121_08';

#$| = 1;

use 5.006_001;
require Exporter;
require overload;

[...1225 lines suppressed...]
the old (platform-specific) ordering: an even prettier solution might
be to use the C<Sortkeys> filter of Data::Dumper.

=head1 AUTHOR

Gurusamy Sarathy        gsar at activestate.com

Copyright (c) 1996-98 Gurusamy Sarathy. All rights reserved.
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.

=head1 VERSION

Version 2.121  (Aug 24 2003)

=head1 SEE ALSO

perl(1)

=cut

--- NEW FILE: Todo ---
=head1 NAME

TODO - seeds germane, yet not germinated

=head1 DESCRIPTION

The following functionality will be supported in the next few releases.

=over 4

=item  $Data::Dumper::Expdepth I<or> $I<OBJ>->Expdepth(I<NEWVAL>)

Dump contents explicitly up to a certain depth and then use names for
cross-referencing identical references.  (useful in debugger, in situations
where we don't care so much for cross-references).

=item Make C<Dumpxs()> honor C<$Useqq>

=item Fix formatting when Terse is set and Indent >= 2

=item Output space after '\' (ref constructor) for high enough Indent

=item Implement redesign that allows various backends (Perl, Lisp,
some-binary-data-format, graph-description-languages, etc.)

=item Dump traversal in breadth-first order

=back

--- NEW FILE: Makefile.PL ---
use ExtUtils::MakeMaker;
WriteMakefile(
	NAME		=> "Data::Dumper",
	VERSION_FROM	=> 'Dumper.pm',
	'dist'		=> {
			     COMPRESS	=> 'gzip -9f',
	      		     SUFFIX	=> 'gz',
	      		     DIST_DEFAULT => 'all tardist',
			   },
	MAN3PODS	=> {},
);

--- NEW FILE: Dumper.xs ---
#define PERL_NO_GET_CONTEXT
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"

static I32 num_q (char *s, STRLEN slen);
static I32 esc_q (char *dest, char *src, STRLEN slen);
static I32 esc_q_utf8 (pTHX_ SV *sv, char *src, STRLEN slen);
static SV *sv_x (pTHX_ SV *sv, const char *str, STRLEN len, I32 n);
static I32 DD_dump (pTHX_ SV *val, const char *name, STRLEN namelen, SV *retval,
		    HV *seenhv, AV *postav, I32 *levelp, I32 indent,
		    SV *pad, SV *xpad, SV *apad, SV *sep, SV *pair,
		    SV *freezer, SV *toaster,
		    I32 purity, I32 deepcopy, I32 quotekeys, SV *bless,
		    I32 maxdepth, SV *sortkeys);

#ifndef HvNAME_get
#define HvNAME_get HvNAME
#endif
[...1106 lines suppressed...]
			    }
			}
			sv_catpvn(retval, ";", 1);
			    sv_catsv(retval, sep);
		    }
		    sv_setpvn(valstr, "", 0);
		    if (gimme == G_ARRAY) {
			XPUSHs(sv_2mortal(retval));
			if (i < imax)	/* not the last time thro ? */
			    retval = newSVpvn("",0);
		    }
		}
		SvREFCNT_dec(postav);
		SvREFCNT_dec(valstr);
	    }
	    else
		croak("Call to new() method failed to return HASH ref");
	    if (gimme == G_SCALAR)
		XPUSHs(sv_2mortal(retval));
	}




More information about the dslinux-commit mailing list