r63349 - in /branches/upstream/libdata-dumper-concise-perl/current: Changes META.yml Makefile.PL lib/Data/Dumper/Concise.pm lib/Data/Dumper/Concise/Sugar.pm t/dwarn.t t/sugar.t

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Tue Oct 5 00:27:04 UTC 2010


Author: jawnsy-guest
Date: Tue Oct  5 00:26:54 2010
New Revision: 63349

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=63349
Log:
[svn-upgrade] new version libdata-dumper-concise-perl (2.012)

Modified:
    branches/upstream/libdata-dumper-concise-perl/current/Changes
    branches/upstream/libdata-dumper-concise-perl/current/META.yml
    branches/upstream/libdata-dumper-concise-perl/current/Makefile.PL
    branches/upstream/libdata-dumper-concise-perl/current/lib/Data/Dumper/Concise.pm
    branches/upstream/libdata-dumper-concise-perl/current/lib/Data/Dumper/Concise/Sugar.pm
    branches/upstream/libdata-dumper-concise-perl/current/t/dwarn.t
    branches/upstream/libdata-dumper-concise-perl/current/t/sugar.t

Modified: branches/upstream/libdata-dumper-concise-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-dumper-concise-perl/current/Changes?rev=63349&op=diff
==============================================================================
--- branches/upstream/libdata-dumper-concise-perl/current/Changes (original)
+++ branches/upstream/libdata-dumper-concise-perl/current/Changes Tue Oct  5 00:26:54 2010
@@ -1,3 +1,10 @@
+2.012 Aug 31 2010
+  - Make DwarnN test still work if Devel::ArgNames isn't installed
+
+2.011 Aug 30 2010
+  - add $DwarnN export
+  - make Devel::ArgNames an optional dep
+
 2.010 Jul 29 2010
   - add $Dwarn export
 

Modified: branches/upstream/libdata-dumper-concise-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-dumper-concise-perl/current/META.yml?rev=63349&op=diff
==============================================================================
--- branches/upstream/libdata-dumper-concise-perl/current/META.yml (original)
+++ branches/upstream/libdata-dumper-concise-perl/current/META.yml Tue Oct  5 00:26:54 2010
@@ -19,8 +19,7 @@
     - inc
     - t
 requires:
-  Devel::ArgNames: 0.03
   perl: 5.6.0
 resources:
   license: http://dev.perl.org/licenses/
-version: 2.010
+version: 2.012

Modified: branches/upstream/libdata-dumper-concise-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-dumper-concise-perl/current/Makefile.PL?rev=63349&op=diff
==============================================================================
--- branches/upstream/libdata-dumper-concise-perl/current/Makefile.PL (original)
+++ branches/upstream/libdata-dumper-concise-perl/current/Makefile.PL Tue Oct  5 00:26:54 2010
@@ -4,6 +4,5 @@
 use warnings FATAL => 'all';
 
 all_from 'lib/Data/Dumper/Concise.pm';
-requires 'Devel::ArgNames' => 0.03;
 
 WriteAll;

Modified: branches/upstream/libdata-dumper-concise-perl/current/lib/Data/Dumper/Concise.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-dumper-concise-perl/current/lib/Data/Dumper/Concise.pm?rev=63349&op=diff
==============================================================================
--- branches/upstream/libdata-dumper-concise-perl/current/lib/Data/Dumper/Concise.pm (original)
+++ branches/upstream/libdata-dumper-concise-perl/current/lib/Data/Dumper/Concise.pm Tue Oct  5 00:26:54 2010
@@ -2,7 +2,7 @@
 
 use 5.006;
 
-$VERSION = '2.010';
+$VERSION = '2.012';
 
 require Exporter;
 require Data::Dumper;

Modified: branches/upstream/libdata-dumper-concise-perl/current/lib/Data/Dumper/Concise/Sugar.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-dumper-concise-perl/current/lib/Data/Dumper/Concise/Sugar.pm?rev=63349&op=diff
==============================================================================
--- branches/upstream/libdata-dumper-concise-perl/current/lib/Data/Dumper/Concise/Sugar.pm (original)
+++ branches/upstream/libdata-dumper-concise-perl/current/lib/Data/Dumper/Concise/Sugar.pm Tue Oct  5 00:26:54 2010
@@ -4,22 +4,23 @@
 
 use Exporter ();
 use Data::Dumper::Concise ();
-use Devel::ArgNames;
 
 BEGIN { @ISA = qw(Exporter) }
 
- at EXPORT = qw($Dwarn Dwarn DwarnS DwarnL DwarnN);
+ at EXPORT = qw($Dwarn $DwarnN Dwarn DwarnS DwarnL DwarnN);
 
 sub Dwarn { return DwarnL(@_) if wantarray; DwarnS($_[0]) }
 
 our $Dwarn = \&Dwarn;
+our $DwarnN = \&DwarnN;
 
 sub DwarnL { warn Data::Dumper::Concise::Dumper @_; @_ }
 
 sub DwarnS ($) { warn Data::Dumper::Concise::Dumper $_[0]; $_[0] }
 
 sub DwarnN ($) {
-   my $x = arg_names();
+   require Devel::ArgNames;
+   my $x = Devel::ArgNames::arg_names();
    warn(($x?$x:'(anon)') . ' => ' . Data::Dumper::Concise::Dumper $_[0]); $_[0]
 }
 
@@ -114,6 +115,10 @@
 
   $Dwarn = \&Dwarn
 
+=head2 $DwarnN
+
+  $DwarnN = \&DwarnN
+
 =head2 DwarnL
 
   sub Dwarn { warn Data::Dumper::Concise::Dumper @_; @_ }
@@ -125,6 +130,8 @@
 =head2 DwarnN
 
   sub DwarnN { warn '$argname => ' . Data::Dumper::Concise::Dumper $_[0]; $_[0] }
+
+B<Note>: this requires L<Devel::ArgNames> to be installed.
 
 =head1 TIPS AND TRICKS
 

Modified: branches/upstream/libdata-dumper-concise-perl/current/t/dwarn.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-dumper-concise-perl/current/t/dwarn.t?rev=63349&op=diff
==============================================================================
--- branches/upstream/libdata-dumper-concise-perl/current/t/dwarn.t (original)
+++ branches/upstream/libdata-dumper-concise-perl/current/t/dwarn.t Tue Oct  5 00:26:54 2010
@@ -8,4 +8,5 @@
 can_ok __PACKAGE__, qw{Dwarn DwarnS DwarnL DwarnN};
 
 can_ok 'Devel::Dwarn', qw{Dwarn DwarnS DwarnL DwarnN};
-ok($Dwarn, 'Coderef gets exported too');
+ok($Dwarn, '$Dwarn gets exported');
+ok($DwarnN, '$DwarnN gets exported');

Modified: branches/upstream/libdata-dumper-concise-perl/current/t/sugar.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-dumper-concise-perl/current/t/sugar.t?rev=63349&op=diff
==============================================================================
--- branches/upstream/libdata-dumper-concise-perl/current/t/sugar.t (original)
+++ branches/upstream/libdata-dumper-concise-perl/current/t/sugar.t Tue Oct  5 00:26:54 2010
@@ -46,13 +46,16 @@
 }
 
 DWARNN: {
-   my $x = [1];
-   my $foo = DwarnN $x;
-   is $warned_string, qq{\$x => [\n  1\n]\n}, 'DwarnN warns';
+   my $loaded = eval { require Devel::ArgNames; 1 };
+   if ($loaded) {
+      my $x = [1];
+      my $foo = DwarnN $x;
+      is $warned_string, qq{\$x => [\n  1\n]\n}, 'DwarnN warns';
 
-   ok eq_array($foo, [1]), 'DwarnN passes through correctly';
+      ok eq_array($foo, [1]), 'DwarnN passes through correctly';
 
-   DwarnN [1];
-   is $warned_string, qq{(anon) => [\n  1\n]\n}, 'DwarnN warns';
+      DwarnN [1];
+      is $warned_string, qq{(anon) => [\n  1\n]\n}, 'DwarnN warns';
+   }
 }
 




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