r48806 - in /branches/upstream/libdata-dumper-concise-perl/current: Changes MANIFEST META.yml lib/Data/Dumper/Concise.pm lib/Data/Dumper/Concise/ lib/Data/Dumper/Concise/Sugar.pm lib/Devel/ lib/Devel/Dwarn.pm t/dwarn.t t/sugar.t

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Wed Dec 16 00:44:07 UTC 2009


Author: jawnsy-guest
Date: Wed Dec 16 00:43:59 2009
New Revision: 48806

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

Added:
    branches/upstream/libdata-dumper-concise-perl/current/lib/Data/Dumper/Concise/
    branches/upstream/libdata-dumper-concise-perl/current/lib/Data/Dumper/Concise/Sugar.pm
    branches/upstream/libdata-dumper-concise-perl/current/lib/Devel/
    branches/upstream/libdata-dumper-concise-perl/current/lib/Devel/Dwarn.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
    branches/upstream/libdata-dumper-concise-perl/current/MANIFEST
    branches/upstream/libdata-dumper-concise-perl/current/META.yml
    branches/upstream/libdata-dumper-concise-perl/current/lib/Data/Dumper/Concise.pm

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=48806&op=diff
==============================================================================
--- branches/upstream/libdata-dumper-concise-perl/current/Changes (original)
+++ branches/upstream/libdata-dumper-concise-perl/current/Changes Wed Dec 16 00:43:59 2009
@@ -1,3 +1,8 @@
+1.100 Dec 10 2009
+  - add Data::Dumper::Concise::Sugar containing Dwarn and DwarnS
+    helper functions
+  - add Devel::Dwarn as a more concise alias for ::Sugar
+
 1.002 Nov 22 2009
   - open up non-ref and multiple arguments since I've not seen any other
     viable use for the additional syntax

Modified: branches/upstream/libdata-dumper-concise-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-dumper-concise-perl/current/MANIFEST?rev=48806&op=diff
==============================================================================
--- branches/upstream/libdata-dumper-concise-perl/current/MANIFEST (original)
+++ branches/upstream/libdata-dumper-concise-perl/current/MANIFEST Wed Dec 16 00:43:59 2009
@@ -8,7 +8,11 @@
 inc/Module/Install/Win32.pm
 inc/Module/Install/WriteAll.pm
 lib/Data/Dumper/Concise.pm
+lib/Data/Dumper/Concise/Sugar.pm
+lib/Devel/Dwarn.pm
 Makefile.PL
 MANIFEST			This list of files
 META.yml
 t/concise.t
+t/dwarn.t
+t/sugar.t

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=48806&op=diff
==============================================================================
--- branches/upstream/libdata-dumper-concise-perl/current/META.yml (original)
+++ branches/upstream/libdata-dumper-concise-perl/current/META.yml Wed Dec 16 00:43:59 2009
@@ -1,7 +1,7 @@
 ---
 abstract: 'Less indentation and newlines plus sub deparsing'
 author:
-  - 'Matt S. Trout <mst at shadowcat.co.uk>'
+  - 'mst - Matt S. Trout <mst at shadowcat.co.uk>'
 build_requires:
   ExtUtils::MakeMaker: 6.42
 configure_requires:
@@ -22,4 +22,4 @@
   perl: 5.6.0
 resources:
   license: http://dev.perl.org/licenses/
-version: 1.002
+version: 1.100

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=48806&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 Wed Dec 16 00:43:59 2009
@@ -2,7 +2,7 @@
 
 use 5.006;
 
-$VERSION = '1.002';
+$VERSION = '1.100';
 
 require Exporter;
 require Data::Dumper;
@@ -118,6 +118,14 @@
 write a Data::Dumper::Concise::ButWithExtraTwiddlyBits if it makes you
 happy. Then tell us so we can add it to the see also section.
 
+=head1 SUGARY SYNTAX
+
+This package also provides:
+
+L<Data::Dumper::Concise::Sugar> - provides Dwarn and DwarnS convenience functions
+
+L<Devel::Dwarn> - shorter form for Data::Dumper::Concise::Sugar
+
 =head1 SEE ALSO
 
 We use for some purposes, and dearly love, the following alternatives:
@@ -130,11 +138,11 @@
 
 =head1 AUTHOR
 
-Matt S. Trout <mst at shadowcat.co.uk>
+mst - Matt S. Trout <mst at shadowcat.co.uk>
 
 =head1 CONTRIBUTORS
 
-None required yet. Maybe this module is perfect (hahahahaha ...).
+frew - Arthur Axel "fREW" Schmidt <frioux at gmail.com>
 
 =head1 COPYRIGHT
 

Added: 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=48806&op=file
==============================================================================
--- branches/upstream/libdata-dumper-concise-perl/current/lib/Data/Dumper/Concise/Sugar.pm (added)
+++ branches/upstream/libdata-dumper-concise-perl/current/lib/Data/Dumper/Concise/Sugar.pm Wed Dec 16 00:43:59 2009
@@ -1,0 +1,69 @@
+package Data::Dumper::Concise::Sugar;
+
+use 5.006;
+
+use Exporter ();
+use Data::Dumper::Concise ();
+
+BEGIN { @ISA = qw(Exporter) }
+
+ at EXPORT = qw(Dwarn DwarnS);
+
+sub Dwarn { warn Data::Dumper::Concise::Dumper @_; @_ }
+
+sub DwarnS ($) { warn Data::Dumper::Concise::Dumper $_[0]; $_[0] }
+
+=head1 NAME
+
+Data::Dumper::Concise::Sugar - return Dwarn @return_value
+
+=head1 SYNOPSIS
+
+  use Data::Dumper::Concise::Sugar;
+
+  return Dwarn some_call(...)
+
+is equivalent to:
+
+  use Data::Dumper::Concise;
+
+  my @return = some_call(...);
+  warn Dumper(@return);
+  return @return;
+
+but shorter. If you need to force scalar context on the value,
+
+  use Data::Dumper::Concise::Sugar;
+
+  return DwarnS some_call(...)
+
+is equivalent to:
+
+  use Data::Dumper::Concise;
+
+  my $return = some_call(...);
+  warn Dumper($return);
+  return $return;
+
+=head1 DESCRIPTION
+
+  use Data::Dumper::Concise::Sugar;
+
+will import Dwarn and DwarnS into your namespace. Using L<Exporter>, so see
+its docs for ways to make it do something else.
+
+=head2 Dwarn
+
+  sub Dwarn { warn Data::Dumper::Concise::Dumper @_; @_ }
+
+=head3 DwarnS
+
+  sub DwarnS ($) { warn Data::Dumper::Concise::Dumper $_[0]; $_[0] }
+
+=head1 SEE ALSO
+
+You probably want L<Devel::Dwarn>, it's the shorter name for this module.
+
+=cut
+
+1;

Added: branches/upstream/libdata-dumper-concise-perl/current/lib/Devel/Dwarn.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-dumper-concise-perl/current/lib/Devel/Dwarn.pm?rev=48806&op=file
==============================================================================
--- branches/upstream/libdata-dumper-concise-perl/current/lib/Devel/Dwarn.pm (added)
+++ branches/upstream/libdata-dumper-concise-perl/current/lib/Devel/Dwarn.pm Wed Dec 16 00:43:59 2009
@@ -1,0 +1,48 @@
+package Devel::Dwarn;
+
+use Data::Dumper::Concise::Sugar ();
+
+sub import {
+  Data::Dumper::Concise::Sugar->export_to_level(1, @_);
+}
+
+=head1 NAME
+
+Devel::Dwarn - return Dwarn @return_value
+
+=head1 SYNOPSIS
+
+  use Devel::Dwarn;
+
+  return Dwarn some_call(...)
+
+is equivalent to:
+
+  use Data::Dumper::Concise;
+
+  my @return = some_call(...);
+  warn Dumper(@return);
+  return @return;
+
+but shorter. If you need to force scalar context on the value,
+
+  use Devel::Dwarn;
+
+  return DwarnS some_call(...)
+
+is equivalent to:
+
+  use Data::Dumper::Concise;
+
+  my $return = some_call(...);
+  warn Dumper($return);
+  return $return;
+
+=head1 SEE ALSO
+
+This module is really just a shortcut for L<Data::Dumper::Concise::Sugar>, check
+it out for more complete documentation.
+
+=cut
+
+1;

Added: 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=48806&op=file
==============================================================================
--- branches/upstream/libdata-dumper-concise-perl/current/t/dwarn.t (added)
+++ branches/upstream/libdata-dumper-concise-perl/current/t/dwarn.t Wed Dec 16 00:43:59 2009
@@ -1,0 +1,8 @@
+use strict;
+use warnings;
+
+use Devel::Dwarn;
+
+use Test::More qw(no_plan);
+
+can_ok __PACKAGE__, qw{Dwarn DwarnS};

Added: 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=48806&op=file
==============================================================================
--- branches/upstream/libdata-dumper-concise-perl/current/t/sugar.t (added)
+++ branches/upstream/libdata-dumper-concise-perl/current/t/sugar.t Wed Dec 16 00:43:59 2009
@@ -1,0 +1,24 @@
+use strict;
+use warnings;
+use Data::Dumper::Concise::Sugar;
+
+use Data::Dumper::Concise ();
+
+use Test::More qw(no_plan);
+
+my $warned_string;
+
+BEGIN {
+   $SIG{'__WARN__'} = sub {
+      $warned_string = $_[0]
+   }
+}
+
+my @foo = Dwarn 'warn', 'friend';
+is $warned_string,qq{"warn"\n"friend"\n}, 'Dwarn warns';
+
+ok eq_array(\@foo, ['warn','friend']), 'Dwarn passes through correctly';
+
+my $bar = DwarnS 'robot',2,3;
+is $warned_string,qq{"robot"\n}, 'DwarnS warns';
+is $bar, 'robot', 'DwarnS passes through correctly';




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