diff -Nru libdata-show-perl-0.002001/Changes libdata-show-perl-0.002002/Changes --- libdata-show-perl-0.002001/Changes 2012-01-20 06:45:43.000000000 +0000 +++ libdata-show-perl-0.002002/Changes 2013-10-21 23:20:04.000000000 +0000 @@ -32,3 +32,10 @@ - Fixed annoying flattening of show(%hash) construct (thanks Salvatore!) + + +0.002002 Tue Oct 22 10:20:04 2013 + + - Refixed annoying flattening + + - Fixed problems with 5.18 (thanks John) diff -Nru libdata-show-perl-0.002001/META.yml libdata-show-perl-0.002002/META.yml --- libdata-show-perl-0.002001/META.yml 2012-01-20 06:45:44.000000000 +0000 +++ libdata-show-perl-0.002002/META.yml 2013-10-21 23:20:05.000000000 +0000 @@ -1,6 +1,6 @@ --- #YAML:1.0 name: Data-Show -version: 0.002001 +version: 0.002002 abstract: Dump data structures with name and point-of-origin author: - Damian Conway @@ -18,7 +18,7 @@ directory: - t - inc -generated_by: ExtUtils::MakeMaker version 6.56 +generated_by: ExtUtils::MakeMaker version 6.57_05 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 diff -Nru libdata-show-perl-0.002001/README libdata-show-perl-0.002002/README --- libdata-show-perl-0.002001/README 2012-01-20 06:45:43.000000000 +0000 +++ libdata-show-perl-0.002002/README 2013-10-21 23:20:04.000000000 +0000 @@ -1,4 +1,4 @@ -Data::Show version 0.002001 +Data::Show version 0.002002 Wrapper around Data::Dump to provide better context information diff -Nru libdata-show-perl-0.002001/debian/changelog libdata-show-perl-0.002002/debian/changelog --- libdata-show-perl-0.002001/debian/changelog 2012-01-20 09:56:03.000000000 +0000 +++ libdata-show-perl-0.002002/debian/changelog 2013-10-22 04:35:41.000000000 +0000 @@ -1,3 +1,24 @@ +libdata-show-perl (0.002002-1) unstable; urgency=low + + [ gregor herrmann ] + * debian/control: update {versioned,alternative} (build) dependencies. + + [ Salvatore Bonaccorso ] + * Change Vcs-Git to canonical URI (git://anonscm.debian.org) + * Change search.cpan.org based URIs to metacpan.org based URIs + + [ Axel Beckert ] + * debian/copyright: migrate pre-1.0 format to 1.0 using "cme fix dpkg- + copyright" + + [ Salvatore Bonaccorso ] + * Imported Upstream version 0.002002 + * Update copyright years for debian/* packaging files + * Bump Standards-Version to 3.9.4 + * Wrap and sort fields in debian/control file + + -- Salvatore Bonaccorso Tue, 22 Oct 2013 06:33:17 +0200 + libdata-show-perl (0.002001-1) unstable; urgency=low * Imported Upstream version 0.002001 diff -Nru libdata-show-perl-0.002001/debian/control libdata-show-perl-0.002002/debian/control --- libdata-show-perl-0.002001/debian/control 2012-01-20 09:56:03.000000000 +0000 +++ libdata-show-perl-0.002002/debian/control 2013-10-22 04:35:41.000000000 +0000 @@ -1,19 +1,20 @@ Source: libdata-show-perl +Maintainer: Debian Perl Group +Uploaders: + Salvatore Bonaccorso , + gregor herrmann Section: perl Priority: optional Build-Depends: debhelper (>= 8), perl Build-Depends-Indep: libdata-dump-perl (>= 1.21), libtest-pod-perl -Maintainer: Debian Perl Group -Uploaders: Salvatore Bonaccorso , - gregor herrmann -Standards-Version: 3.9.2 -Homepage: http://search.cpan.org/dist/Data-Show/ -Vcs-Git: git://git.debian.org/pkg-perl/packages/libdata-show-perl.git +Standards-Version: 3.9.4 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/libdata-show-perl.git +Vcs-Git: git://anonscm.debian.org/pkg-perl/packages/libdata-show-perl.git +Homepage: https://metacpan.org/release/Data-Show/ Package: libdata-show-perl Architecture: all -Depends: ${misc:Depends}, ${perl:Depends}, libdata-dump-perl (>= 1.17) +Depends: libdata-dump-perl, ${misc:Depends}, ${perl:Depends} Description: Perl module to dump data structures with name and point-of-origin Data::Show provides a simple wrapper around the Data::Dump module. . diff -Nru libdata-show-perl-0.002001/debian/copyright libdata-show-perl-0.002002/debian/copyright --- libdata-show-perl-0.002001/debian/copyright 2012-01-20 09:56:03.000000000 +0000 +++ libdata-show-perl-0.002002/debian/copyright 2013-10-22 04:35:41.000000000 +0000 @@ -1,14 +1,14 @@ -Format-Specification: http://anonscm.debian.org/viewvc/dep/web/deps/dep5.mdwn?view=markup&pathrev=135 -Maintainer: Damian Conway -Source: http://search.cpan.org/dist/Data-Show/ -Name: Data-Show +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Data-Show +Upstream-Contact: Damian Conway +Source: https://metacpan.org/release/Data-Show/ Files: * Copyright: 2010, Damian Conway -License: Artistic or GPL-1+ +License: Artistic or GPL-1+ Files: debian/* -Copyright: 2010-2012, Salvatore Bonaccorso +Copyright: 2010-2013, Salvatore Bonaccorso 2011, gregor herrmann License: Artistic or GPL-1+ diff -Nru libdata-show-perl-0.002001/debian/watch libdata-show-perl-0.002002/debian/watch --- libdata-show-perl-0.002001/debian/watch 2012-01-20 09:56:03.000000000 +0000 +++ libdata-show-perl-0.002002/debian/watch 2013-10-22 04:35:41.000000000 +0000 @@ -1,2 +1,2 @@ version=3 -http://search.cpan.org/dist/Data-Show/ .*/Data-Show-v?(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$ +https://metacpan.org/release/Data-Show/ .*/Data-Show-v?(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$ diff -Nru libdata-show-perl-0.002001/lib/Data/Show.pm libdata-show-perl-0.002002/lib/Data/Show.pm --- libdata-show-perl-0.002001/lib/Data/Show.pm 2012-01-20 06:45:43.000000000 +0000 +++ libdata-show-perl-0.002002/lib/Data/Show.pm 2013-10-21 23:20:04.000000000 +0000 @@ -5,7 +5,7 @@ use Data::Dump 'dump'; use 5.010; -our $VERSION = '0.002001'; +our $VERSION = '0.002002'; # Unconditionally export show()... sub import { @@ -79,6 +79,9 @@ my $MAX_WIDTH = 72; my $TITLE_POS = 6; +# Be a ninja... +our @CARP_NOT; + # The whole point of the module... sub show { @@ -93,12 +96,13 @@ } # Trim filename and format context info and description... - $file =~ s{.*/}{}xms; + $file =~ s{.*[/\\]}{}xms; my $context = "'$file', line $line"; $desc //= $context; # Isolate arg list and compress internal whitespace... $desc =~ s{ \A (?: (?!\bshow) . )*? \b show \b \s* ($CODE) \s* (?: [;\}] .* | \Z ) }{$1}xms; + $desc =~ s{\A \( | \) \Z}{}gxms; $desc =~ s{\s+}{ }gxms; # Serialize Contextual::Return::Value objects (which break dump())... @@ -110,12 +114,9 @@ } # Serialize argument (restoring it, if it was inappropriately flattened)... - my $representation; - given ($desc) { - when (m{ \A \@ $IDENT \s* \Z }xms) { $representation = dump \@_; } - when (m{ \A \(? \s* \% $IDENT \s* \)? \s* \Z }xms) { $representation = dump {@_};} - default { $representation = dump @_; } - } + my $representation = $desc =~ m{ \A \@ $IDENT \s* \Z }xms ? dump(\@_ ) + : $desc =~ m{ \A \% $IDENT \s* \Z }xms ? dump({@_}) + : dump( @_ ); # Indent representation wrt heading... $representation =~ s{^}{ q{ } x $DEFAULT_INDENT }gxmse; @@ -151,7 +152,7 @@ =head1 VERSION -This document describes Data::Show version 0.002001 +This document describes Data::Show version 0.002002 =head1 SYNOPSIS diff -Nru libdata-show-perl-0.002001/t/show.t libdata-show-perl-0.002002/t/show.t --- libdata-show-perl-0.002001/t/show.t 2011-09-30 06:17:37.000000000 +0000 +++ libdata-show-perl-0.002002/t/show.t 2013-10-21 23:16:24.000000000 +0000 @@ -1,8 +1,8 @@ -#! /usr/bin/perl -w -use 5.010; - -use Data::Show; use Test::More 'no_plan'; -my $STDERR; close STDERR; open *STDERR, '>', \$STDERR or die $!; +use Data::Show; +use Test::More 'no_plan'; +my $STDERR; +close STDERR; +open *STDERR, '>', \$STDERR or die $!; my %foo = (foo => 1, food => 2, fool => 3, foop => 4, foon => [5..10]); my @bar = qw; @@ -33,7 +33,12 @@ my @got = split "(?<=\n)", $STDERR; for my $n (0..$#expected) { - is $got[$n], $expected[$n] => ": $expected[$n]"; + if ($expected[$n] =~ m{\A \s* \{ }xms) { + is_deeply(eval($got[$n]), eval($expected[$n]) => ": $expected[$n]"); + } + else { + is $got[$n], $expected[$n] => ": $expected[$n]"; + } } sub sq {