r52767 - in /branches/upstream/libdata-peek-perl/current: ChangeLog META.yml Makefile.PL Peek.pm Peek.xs README t/10_DDumper.t
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Mon Feb 15 03:43:26 UTC 2010
Author: jawnsy-guest
Date: Mon Feb 15 03:42:02 2010
New Revision: 52767
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=52767
Log:
[svn-upgrade] Integrating new upstream version, libdata-peek-perl (0.30)
Modified:
branches/upstream/libdata-peek-perl/current/ChangeLog
branches/upstream/libdata-peek-perl/current/META.yml
branches/upstream/libdata-peek-perl/current/Makefile.PL
branches/upstream/libdata-peek-perl/current/Peek.pm
branches/upstream/libdata-peek-perl/current/Peek.xs
branches/upstream/libdata-peek-perl/current/README
branches/upstream/libdata-peek-perl/current/t/10_DDumper.t
Modified: branches/upstream/libdata-peek-perl/current/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-peek-perl/current/ChangeLog?rev=52767&op=diff
==============================================================================
--- branches/upstream/libdata-peek-perl/current/ChangeLog (original)
+++ branches/upstream/libdata-peek-perl/current/ChangeLog Mon Feb 15 03:42:02 2010
@@ -1,3 +1,10 @@
+2010-02-14 0.30 - H.Merijn Brand <h.m.brand at xs4all.nl>
+
+ * Use $Data::Dumper::Quotekeys = 0; instead of removing the quotes myself
+ * Put first hash element after opening lonely brace
+ * Upped copyright to 2010
+ * Use warn () instead of print STDERR
+
2009-11-09 0.29 - H.Merijn Brand <h.m.brand at xs4all.nl>
* Use skip instead of skip_all for builds that have no DPeek ()
Modified: branches/upstream/libdata-peek-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-peek-perl/current/META.yml?rev=52767&op=diff
==============================================================================
--- branches/upstream/libdata-peek-perl/current/META.yml (original)
+++ branches/upstream/libdata-peek-perl/current/META.yml Mon Feb 15 03:42:02 2010
@@ -1,6 +1,6 @@
--- #YAML:1.1
name: Data::Peek
-version: 0.29
+version: 0.30
abstract: Modified and extended debugging facilities
license: perl
author:
@@ -10,7 +10,7 @@
provides:
Data::Peek:
file: Peek.pm
- version: 0.29
+ version: 0.30
requires:
perl: 5.006
DynaLoader: 0
Modified: branches/upstream/libdata-peek-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-peek-perl/current/Makefile.PL?rev=52767&op=diff
==============================================================================
--- branches/upstream/libdata-peek-perl/current/Makefile.PL (original)
+++ branches/upstream/libdata-peek-perl/current/Makefile.PL Mon Feb 15 03:42:02 2010
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# Copyright PROCURA B.V. (c) 2008-2009 H.Merijn Brand
+# Copyright PROCURA B.V. (c) 2008-2010 H.Merijn Brand
require 5.006; # <- also see postamble at the bottom for META.yml
use strict;
@@ -131,7 +131,7 @@
=head1 COPYRIGHT AND LICENSE
-Copyright (C) 2008-2009 H.Merijn Brand
+Copyright (C) 2008-2010 H.Merijn Brand
This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
Modified: branches/upstream/libdata-peek-perl/current/Peek.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-peek-perl/current/Peek.pm?rev=52767&op=diff
==============================================================================
--- branches/upstream/libdata-peek-perl/current/Peek.pm (original)
+++ branches/upstream/libdata-peek-perl/current/Peek.pm Mon Feb 15 03:42:02 2010
@@ -6,7 +6,7 @@
use DynaLoader ();
use vars qw( $VERSION @ISA @EXPORT @EXPORT_OK );
-$VERSION = "0.29";
+$VERSION = "0.30";
@ISA = qw( DynaLoader Exporter );
@EXPORT = qw( DDumper DDsort DPeek DDisplay DDump DDual DGrow );
@EXPORT_OK = qw( triplevar );
@@ -68,16 +68,21 @@
sub DDumper
{
- local $Data::Dumper::Sortkeys = $_sortkeys;
- local $Data::Dumper::Indent = 1;
+ local $Data::Dumper::Sortkeys = $_sortkeys;
+ local $Data::Dumper::Indent = 1;
+ local $Data::Dumper::Quotekeys = 0;
+ local $Data::Dumper::Deparse = 1;
+ local $Data::Dumper::Terse = 1;
+ local $Data::Dumper::Useqq = 0; # I want unicode visible
my $s = Data::Dumper::Dumper @_;
- $s =~ s!^(\s*)'([^']*)'\s*=>!sprintf "%s%-16s =>", $1, $2!gme; # Align => '
- $s =~ s!\bbless\s*\(\s*!bless (!gm and $s =~ s!\s+\)([;,])$!)$1!gm;
- $s =~ s!^(?= *[]}](?:[;,]|$))! !gm;
- $s =~ s!^(\s+)!$1$1!gm;
-
- defined wantarray or print STDERR $s;
+ $s =~ s/^(\s*)(.*?)\s*=>/sprintf "%s%-16s =>", $1, $2/gme; # Align =>
+ $s =~ s/\bbless\s*\(\s*/bless (/gm and $s =~ s/\s+\)([;,])$/)$1/gm;
+ $s =~ s/^(?= *[]}](?:[;,]|$))/ /gm;
+ $s =~ s/^(\s*[{[]) *\n *(?=\S)(?![{[])/$1 /gm;
+ $s =~ s/^(\s+)/$1$1/gm;
+
+ defined wantarray or warn $s;
return $s;
} # DDumper
@@ -158,7 +163,7 @@
defined wantarray and return $dump;
- print STDERR $dump;
+ warn $dump;
} # DDump
"Indent";
@@ -220,14 +225,13 @@
* arrows for hashes are aligned at 16 (longer keys don't align)
* closing braces and brackets are now correctly aligned
-In void context, C<DDumper ()> prints to STDERR.
+In void context, C<DDumper ()> warn ()'s.
Example
print DDumper { ape => 1, foo => "egg", bar => [ 2, "baz", undef ]};
- $VAR1 = {
- ape => 1,
+ { ape => 1,
bar => [
2,
'baz',
@@ -251,15 +255,13 @@
These can also be passed to import:
$ perl -MDP=VNR -we'DDumper { foo => 1, bar => 2, zap => 3, gum => 13 }'
- $VAR1 = {
- gum => 13,
+ { gum => 13,
zap => 3,
bar => 2,
foo => 1
};
$ perl -MDP=V -we'DDumper { foo => 1, bar => 2, zap => 3, gum => 13 }'
- $VAR1 = {
- foo => 1,
+ { foo => 1,
gum => 13,
bar => 2,
zap => 3
@@ -394,8 +396,7 @@
my %h = DDump "abc\x{0a}de\x{20ac}fg";
print DDumper \%h;
- $VAR1 = {
- CUR => '11',
+ { CUR => '11',
FLAGS => {
PADBUSY => 1,
PADMY => 1,
@@ -416,8 +417,7 @@
}, 1;
print DDumper \%h;
- $VAR1 = {
- FLAGS => {
+ { FLAGS => {
PADBUSY => 1,
PADMY => 1,
ROK => 1
@@ -570,7 +570,7 @@
=head1 COPYRIGHT AND LICENSE
-Copyright (C) 2008-2009 H.Merijn Brand
+Copyright (C) 2008-2010 H.Merijn Brand
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
Modified: branches/upstream/libdata-peek-perl/current/Peek.xs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-peek-perl/current/Peek.xs?rev=52767&op=diff
==============================================================================
--- branches/upstream/libdata-peek-perl/current/Peek.xs (original)
+++ branches/upstream/libdata-peek-perl/current/Peek.xs Mon Feb 15 03:42:02 2010
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2009 H.Merijn Brand. All rights reserved.
+/* Copyright (c) 2008-2010 H.Merijn Brand. All rights reserved.
* This program is free software; you can redistribute it and/or
* modify it under the same terms as Perl itself.
*/
@@ -58,7 +58,7 @@
void _Dump_Dual (pTHX_ SV *sv, SV *pv, SV *iv, SV *nv, SV *rv)
{
#ifndef NO_SV_PEEK
- (void)fprintf (stderr, "%s\n PV: %s\n IV: %s\n NV: %s\n RV: %s\n",
+ warn ("%s\n PV: %s\n IV: %s\n NV: %s\n RV: %s\n",
sv_peek (sv), sv_peek (pv), sv_peek (iv), sv_peek (nv), sv_peek (rv));
#endif
} /* _Dump_Dual */
@@ -71,7 +71,7 @@
PPCODE:
I32 gimme = GIMME_V;
ST (0) = _DPeek (aTHX_ items, ST (0));
- if (gimme == G_VOID) (void)fprintf (stderr, "%s\n", SvPVX (ST (0)));
+ if (gimme == G_VOID) warn ("%s\n", SvPVX (ST (0)));
XSRETURN (1);
/* XS DPeek */
Modified: branches/upstream/libdata-peek-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-peek-perl/current/README?rev=52767&op=diff
==============================================================================
--- branches/upstream/libdata-peek-perl/current/README (original)
+++ branches/upstream/libdata-peek-perl/current/README Mon Feb 15 03:42:02 2010
@@ -57,7 +57,7 @@
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2008-2009 H.Merijn Brand. All rights reserved.
+Copyright (c) 2008-2010 H.Merijn Brand. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
Modified: branches/upstream/libdata-peek-perl/current/t/10_DDumper.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-peek-perl/current/t/10_DDumper.t?rev=52767&op=diff
==============================================================================
--- branches/upstream/libdata-peek-perl/current/t/10_DDumper.t (original)
+++ branches/upstream/libdata-peek-perl/current/t/10_DDumper.t Mon Feb 15 03:42:02 2010
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use Test::More tests => 56;
+use Test::More tests => 55;
use Test::NoWarnings;
BEGIN {
@@ -27,11 +27,11 @@
eval "\$var = $v";
ok ($dump = DDumper ($var), "DDumper ($v)");
$dump =~ s/\A\$VAR1 = //;
- $dump =~ s/;\n\Z//;
+ $dump =~ s/;?\n\Z//;
}
if ($re) {
like ($dump, qr{$exp}ms, ".. content $re");
- $1 and print STDERR "# '$1' (", length ($1), ")\n";
+ $1 and diag "# '$1' (", length ($1), ")\n";
}
else {
is ($dump, $exp, ".. content");
@@ -54,18 +54,17 @@
(0, 1) 1
\(0, 1) \1
-- Structures
-[0, 1] ^\[\n line 1
- ^ 0,\n line 2
- ^ 1\n line 3
- ^ ]\Z line 4
-[0,1,2] \A\[\n\s+0,\n\s+1,\n\s+2\n\s+]\Z line splitting
+[0, 1] ^\[ 0,\n line 1
+ ^ 1\n line 2
+ ^ ]\Z line 3
+[0,1,2] \A\[\s+0,\n\s+1,\n\s+2\n\s+]\Z line splitting
-- Indentation
-[0] \A\[\n 0\n ]\Z single indent
+[0] \A\[ 0\n ]\Z single indent
[[0],{foo=>1}] ^\[\n outer list
- ^ {4}\[\n {8}0\n {8}],\n {4} inner list
- ^ {4}\{\n {8}foo {14}=> 1\n {8}}\n inner hash
+ ^ {4}\[ 0\n {8}],\n {4} inner list
+ ^ {4}\{ foo {14}=> 1\n {8}}\n inner hash
^ {4}]\Z outer list end
-[[0],{foo=>1}] \A\[\n {4}\[\n {8}0\n {8}],\n {4}\{\n {8}foo {14}=> 1\n {8}}\n {4}]\Z full struct
+[[0],{foo=>1}] \A\[\n {4}\[ 0\n {8}],\n {4}\{ foo {14}=> 1\n {8}}\n {4}]\Z full struct
-- Sorting
S:1:{ab=>1,bc=>2,cd=>3,de=>13} ab.*bc.*cd.*de default sort
S:R:{ab=>1,bc=>2,cd=>3,de=>13} de.*cd.*bc.*ab reverse sort
More information about the Pkg-perl-cvs-commits
mailing list