r1447 - in packages/libdata-dumper-simple-perl/trunk: . debian lib/Data/Dumper t

Gunnar Wolf gwolf at costa.debian.org
Mon Oct 24 16:59:42 UTC 2005


Author: gwolf
Date: 2005-10-24 16:59:41 +0000 (Mon, 24 Oct 2005)
New Revision: 1447

Added:
   packages/libdata-dumper-simple-perl/trunk/Build.PL
   packages/libdata-dumper-simple-perl/trunk/t/pod-coverage.t
   packages/libdata-dumper-simple-perl/trunk/t/pod.t
Modified:
   packages/libdata-dumper-simple-perl/trunk/Changes
   packages/libdata-dumper-simple-perl/trunk/MANIFEST
   packages/libdata-dumper-simple-perl/trunk/META.yml
   packages/libdata-dumper-simple-perl/trunk/Makefile.PL
   packages/libdata-dumper-simple-perl/trunk/README
   packages/libdata-dumper-simple-perl/trunk/debian/changelog
   packages/libdata-dumper-simple-perl/trunk/debian/control
   packages/libdata-dumper-simple-perl/trunk/lib/Data/Dumper/Simple.pm
Log:
New upstream version


Copied: packages/libdata-dumper-simple-perl/trunk/Build.PL (from rev 1446, packages/libdata-dumper-simple-perl/branches/upstream/current/Build.PL)

Modified: packages/libdata-dumper-simple-perl/trunk/Changes
===================================================================
--- packages/libdata-dumper-simple-perl/trunk/Changes	2005-10-24 16:55:24 UTC (rev 1446)
+++ packages/libdata-dumper-simple-perl/trunk/Changes	2005-10-24 16:59:41 UTC (rev 1447)
@@ -1,5 +1,12 @@
 Revision history for Perl extension Data::Dumper::Simple.
 
+0.10  2005-10-08
+    - Added POD tests.
+    - Converted to Module::Build
+    - Fixed tiny bug where import list error wasn't getting
+      reported correctly (because I was missing 'strict'.  Fancy
+      that).
+
 0.07  Thu May 19 2005
     - Implemented patch from Tom Phoenix that makes parentheses
       optional (and a doc fix, too).

Modified: packages/libdata-dumper-simple-perl/trunk/MANIFEST
===================================================================
--- packages/libdata-dumper-simple-perl/trunk/MANIFEST	2005-10-24 16:55:24 UTC (rev 1446)
+++ packages/libdata-dumper-simple-perl/trunk/MANIFEST	2005-10-24 16:59:41 UTC (rev 1447)
@@ -1,3 +1,4 @@
+Build.PL
 Changes
 lib/Data/Dumper/Simple.pm
 Makefile.PL
@@ -8,3 +9,5 @@
 t/20import.t
 t/30autowarn.t
 t/40noparens.t
+t/pod-coverage.t
+t/pod.t

Modified: packages/libdata-dumper-simple-perl/trunk/META.yml
===================================================================
--- packages/libdata-dumper-simple-perl/trunk/META.yml	2005-10-24 16:55:24 UTC (rev 1446)
+++ packages/libdata-dumper-simple-perl/trunk/META.yml	2005-10-24 16:59:41 UTC (rev 1447)
@@ -1,11 +1,17 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
-name:         Data-Dumper-Simple
-version:      0.07
-version_from: lib/Data/Dumper/Simple.pm
-installdirs:  site
+---
+name: Data-Dumper-Simple
+version: 0.10
+author:
+  - Curtis "Ovid" Poe <ovid at cpan.org>
+abstract: Easily dump variables with names
+license: perl
+resources:
+  license: http://dev.perl.org/licenses/
 requires:
-    Filter::Simple:                0.77
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.17
+  Filter::Simple: 0.77
+  Test::More: 0
+provides:
+  Data::Dumper::Simple:
+    file: lib/Data/Dumper/Simple.pm
+    version: 0.10
+generated_by: Module::Build version 0.2702

Modified: packages/libdata-dumper-simple-perl/trunk/Makefile.PL
===================================================================
--- packages/libdata-dumper-simple-perl/trunk/Makefile.PL	2005-10-24 16:55:24 UTC (rev 1446)
+++ packages/libdata-dumper-simple-perl/trunk/Makefile.PL	2005-10-24 16:59:41 UTC (rev 1447)
@@ -1,16 +1,15 @@
+# Note: this file was auto-generated by Module::Build::Compat version 0.03
 use ExtUtils::MakeMaker;
-
-WriteMakefile(
-    'NAME'		=> 'Data::Dumper::Simple',
-    'VERSION_FROM'	=> 'lib/Data/Dumper/Simple.pm',
-    'PREREQ_PM'		=> {
-        'Filter::Simple' => '0.77',
-    },
-    ($] >= 5.005
-        ? (
-            ABSTRACT_FROM => 'lib/Data/Dumper/Simple.pm',
-            AUTHOR        => 'Curtis "Ovid" Poe'
-          )
-        : ()
-    ),
-);
+WriteMakefile
+(
+  'NAME' => 'Data::Dumper::Simple',
+  'VERSION_FROM' => 'lib/Data/Dumper/Simple.pm',
+  'PREREQ_PM' => {
+    'Filter::Simple' => '0.77',
+    'Test::More' => '0'
+  },
+  'INSTALLDIRS' => 'site',
+  'EXE_FILES' => [],
+  'PL_FILES' => {}
+)
+;

Modified: packages/libdata-dumper-simple-perl/trunk/README
===================================================================
--- packages/libdata-dumper-simple-perl/trunk/README	2005-10-24 16:55:24 UTC (rev 1446)
+++ packages/libdata-dumper-simple-perl/trunk/README	2005-10-24 16:59:41 UTC (rev 1447)
@@ -1,4 +1,4 @@
-Data::Dumper::Simple version 0.01
+Data::Dumper::Simple version 0.10
 =====================
 
 INSTALLATION

Modified: packages/libdata-dumper-simple-perl/trunk/debian/changelog
===================================================================
--- packages/libdata-dumper-simple-perl/trunk/debian/changelog	2005-10-24 16:55:24 UTC (rev 1446)
+++ packages/libdata-dumper-simple-perl/trunk/debian/changelog	2005-10-24 16:59:41 UTC (rev 1447)
@@ -1,3 +1,10 @@
+libdata-dumper-simple-perl (0.10-1) unstable; urgency=low
+
+  * New upstream release
+  * Added build-dependency on libmodule-build-perl
+
+ -- Gunnar Wolf <gwolf at debian.org>  Mon, 24 Oct 2005 11:55:32 -0500
+
 libdata-dumper-simple-perl (0.07-1) unstable; urgency=low
 
   * New upstream release

Modified: packages/libdata-dumper-simple-perl/trunk/debian/control
===================================================================
--- packages/libdata-dumper-simple-perl/trunk/debian/control	2005-10-24 16:55:24 UTC (rev 1446)
+++ packages/libdata-dumper-simple-perl/trunk/debian/control	2005-10-24 16:59:41 UTC (rev 1447)
@@ -4,7 +4,7 @@
 Section: perl
 Priority: optional
 Standards-Version: 3.6.1
-Build-Depends-Indep: debhelper (>> 4.1), perl (>> 5.8), perl-modules
+Build-Depends-Indep: debhelper (>> 4.1), perl (>> 5.8), perl-modules, libmodule-build-perl
 
 Package: libdata-dumper-simple-perl
 Architecture: all

Modified: packages/libdata-dumper-simple-perl/trunk/lib/Data/Dumper/Simple.pm
===================================================================
--- packages/libdata-dumper-simple-perl/trunk/lib/Data/Dumper/Simple.pm	2005-10-24 16:55:24 UTC (rev 1446)
+++ packages/libdata-dumper-simple-perl/trunk/lib/Data/Dumper/Simple.pm	2005-10-24 16:59:41 UTC (rev 1447)
@@ -1,17 +1,18 @@
 package Data::Dumper::Simple;
 
 $REVISION = '$Id: Simple.pm,v 1.10 2005/05/20 01:37:08 ovid Exp $';
-$VERSION  = '0.07';
+$VERSION  = '0.10';
 use Filter::Simple;
 use Data::Dumper ();
+use strict;
 
 my $DUMPER_FUNCTION = 'Dumper';
 my $AUTOWARN;
 
-my $COMMA = qr/(?:,|=>)/;
-my $ATOM  = qr/(?!\d)[[:word:]]+/;
-my $SEP   = qr/::/;
-my $NAME  = qr/$SEP?$ATOM(?:$SEP$ATOM)*/;
+my $COMMA      = qr/(?:,|=>)/;
+my $ATOM       = qr/(?!\d)[[:word:]]+/;
+my $SEP        = qr/::/;
+my $NAME       = qr/$SEP?$ATOM(?:$SEP$ATOM)*/;
 
 my $SCALAR     = qr/\$$NAME/;
 my $ARRAY_ELEM = qr/\$$NAME\[[^]]+\]/;
@@ -26,16 +27,16 @@
 my $PAREN_LIST = qr/\([^)]+\)/;
 
 sub import {
-    my ($class, @args) = @_;
-    @args = _validate_args(@args);
+    my ( $class, @args ) = @_;
+    @args = $class->_validate_args(@args);
     my %args = @args;
     $DUMPER_FUNCTION = $args{as}       if $args{as};
     $AUTOWARN        = $args{autowarn} if $args{autowarn};
 }
 
-FILTER_ONLY 
-    executable => sub { # not using code due to a possible bug in Filter::Simple
-        s{
+FILTER_ONLY executable =>
+  sub {    # not using code due to a possible bug in Filter::Simple
+    s{
             $DUMPER_FUNCTION\s*($PAREN_LIST|$ARG_LIST)
         }{
             my $args = $1;
@@ -48,19 +49,19 @@
             }
             "($output)"; # parens prevent accidental indirect method syntax
         }gex
-    };
+  };
 
 sub _validate_args {
-    my @args = @_;
-    if (@args % 2) {
+    my ( $class, @args ) = @_;
+    if ( @args % 2 ) {
         _croak("$class->import requires an even sized list");
     }
     my %args = @args;
-    if ( $args{as} && ! _valid_sub_name($args{as}) ) {
+    if ( $args{as} && !_valid_sub_name( $args{as} ) ) {
         _croak("$args{as} is not a valid name for a subroutine");
     }
     if ( $args{autowarn} ) {
-        $args{autowarn} = 'warn' unless _valid_sub_name($args{autowarn});
+        $args{autowarn} = 'warn' unless _valid_sub_name( $args{autowarn} );
     }
     return %args;
 }
@@ -75,21 +76,22 @@
 sub _munge_argument_list {
     my $arguments     = shift;
     my $sigils        = '@%&';
-    my @raw_var_names = 
-        map { _strip_whitespace($_) }
-        split /(?:,|=>)/ => $arguments;
-    my @raw_escaped   = @raw_var_names;
-    my $varnames  = 
-        join ' ' => 
-        map { s/(\\)?[$sigils]/$1 ? '$' : '*'/ge; s/\\//g; $_ } # turn @array into => [$*]array
-            @raw_var_names;
+    my @raw_var_names =
+      map { _strip_whitespace($_) }
+      split /(?:,|=>)/ => $arguments;
+    my @raw_escaped = @raw_var_names;
+    my $varnames = join ' ' => map {
+        s/(\\)?[$sigils]/$1 ? '$' : '*'/ge;
+        s/\\//g;
+        $_
+      }    # turn @array into => [$*]array
+      @raw_var_names;
 
-    my $escaped_vars = 
-        join ', ' => 
-        map { s/\\\$/\$/g; $_ } # do not take a reference to a scalar
-        map { s/(?<!\\)(?=[$sigils])/\\/g; $_ } # take references to all else
-            @raw_escaped;
-    return ($escaped_vars, $varnames);
+    my $escaped_vars =
+      join ', ' => map { s/\\\$/\$/g; $_ } # do not take a reference to a scalar
+      map { s/(?<!\\)(?=[$sigils])/\\/g; $_ }    # take references to all else
+      @raw_escaped;
+    return ( $escaped_vars, $varnames );
 }
 
 sub _strip_whitespace {
@@ -131,6 +133,12 @@
 Note that this is primarily a debugging tool.  C<Data::Dumper> offers a bit
 more than that, so don't expect this module to be more than it is.
 
+Note that if you strongly object to source filters, I've also released
+L<Data::Dumper::Names>.  It does what this module does by it uses L<PadWalker>
+instead of a source filter.  Unfortunately, it has a few limitations and is not
+as powerful as this module.  Think of L<Data::Dumper::Names> as a "proof of
+concept".
+
 =head2 The Problem
 
 Frequently, we use C<Data::Dumper> to dump out some variables while debugging.

Copied: packages/libdata-dumper-simple-perl/trunk/t/pod-coverage.t (from rev 1446, packages/libdata-dumper-simple-perl/branches/upstream/current/t/pod-coverage.t)

Copied: packages/libdata-dumper-simple-perl/trunk/t/pod.t (from rev 1446, packages/libdata-dumper-simple-perl/branches/upstream/current/t/pod.t)




More information about the Pkg-perl-cvs-commits mailing list