r39402 - in /trunk/libvariable-magic-perl: Changes META.yml Magic.xs Makefile.PL README debian/changelog lib/Variable/Magic.pm t/00-load.t t/13-data.t t/41-clone.t

nhandler-guest at users.alioth.debian.org nhandler-guest at users.alioth.debian.org
Mon Jul 6 12:55:53 UTC 2009


Author: nhandler-guest
Date: Mon Jul  6 12:55:47 2009
New Revision: 39402

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=39402
Log:
Update to 0.36

Modified:
    trunk/libvariable-magic-perl/Changes
    trunk/libvariable-magic-perl/META.yml
    trunk/libvariable-magic-perl/Magic.xs
    trunk/libvariable-magic-perl/Makefile.PL
    trunk/libvariable-magic-perl/README
    trunk/libvariable-magic-perl/debian/changelog
    trunk/libvariable-magic-perl/lib/Variable/Magic.pm
    trunk/libvariable-magic-perl/t/00-load.t
    trunk/libvariable-magic-perl/t/13-data.t
    trunk/libvariable-magic-perl/t/41-clone.t

Modified: trunk/libvariable-magic-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libvariable-magic-perl/Changes?rev=39402&op=diff
==============================================================================
--- trunk/libvariable-magic-perl/Changes (original)
+++ trunk/libvariable-magic-perl/Changes Mon Jul  6 12:55:47 2009
@@ -1,4 +1,10 @@
 Revision history for Variable-Magic
+
+0.36    2009-07-05 16:30 UTC
+        + Chg : getdata() now returns an empty list when no magic is present.
+                It used to return undef but did not croak as stated in the doc.
+                Thanks Matt S. Trout for pointing this out.
+        + Fix : Building and tests with ActiveState Perl 5.8 build >= 822.
 
 0.35    2009-05-15 20:50 UTC
         This is a maintenance release. Users of 0.34 can skip this update.

Modified: trunk/libvariable-magic-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libvariable-magic-perl/META.yml?rev=39402&op=diff
==============================================================================
--- trunk/libvariable-magic-perl/META.yml (original)
+++ trunk/libvariable-magic-perl/META.yml Mon Jul  6 12:55:47 2009
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               Variable-Magic
-version:            0.35
+version:            0.36
 abstract:           Associate user-defined magic to variables from Perl.
 author:
     - Vincent Pit <perl at profvince.com>
@@ -28,7 +28,7 @@
     directory:
         - t
         - inc
-generated_by:       ExtUtils::MakeMaker version 6.50
+generated_by:       ExtUtils::MakeMaker version 6.52
 meta-spec:
     url:      http://module-build.sourceforge.net/META-spec-v1.4.html
     version:  1.4

Modified: trunk/libvariable-magic-perl/Magic.xs
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libvariable-magic-perl/Magic.xs?rev=39402&op=diff
==============================================================================
--- trunk/libvariable-magic-perl/Magic.xs (original)
+++ trunk/libvariable-magic-perl/Magic.xs Mon Jul  6 12:55:47 2009
@@ -1468,7 +1468,7 @@
  sig  = vmg_wizard_sig(wiz);
  data = vmg_data_get(SvRV(sv), sig);
  if (!data)
-  XSRETURN_UNDEF;
+  XSRETURN_EMPTY;
  ST(0) = data;
  XSRETURN(1);
 

Modified: trunk/libvariable-magic-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libvariable-magic-perl/Makefile.PL?rev=39402&op=diff
==============================================================================
--- trunk/libvariable-magic-perl/Makefile.PL (original)
+++ trunk/libvariable-magic-perl/Makefile.PL Mon Jul  6 12:55:47 2009
@@ -23,14 +23,18 @@
 }
 
 my $is_as = 0;
-print "Checking if this is Windows ActiveState 5.8.[78]... ";
-if ($^O eq 'MSWin32' && $^V ge v5.8.7 && $^V lt v5.8.9) {
+print "Checking if this is ActiveState Perl 5.8.8 build 822 or higher... ";
+if ($^V eq v5.8.8) {
  eval {
-  require Win32;
+  require ActivePerl;
   1;
  } and do {
-  if (defined &Win32::BuildNumber) {
-   $is_as = 1;
+  if (defined &ActivePerl::BUILD) {
+   my $build = int ActivePerl::BUILD();
+   if ($build >= 822) {
+    $is_as = 1;
+    push @DEFINES, '-DVMG_COMPAT_ARRAY_PUSH_NOLEN=1';
+   }
   }
  }
 }

Modified: trunk/libvariable-magic-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libvariable-magic-perl/README?rev=39402&op=diff
==============================================================================
--- trunk/libvariable-magic-perl/README (original)
+++ trunk/libvariable-magic-perl/README Mon Jul  6 12:55:47 2009
@@ -2,7 +2,7 @@
     Variable::Magic - Associate user-defined magic to variables from Perl.
 
 VERSION
-    Version 0.35
+    Version 0.36
 
 SYNOPSIS
         use Variable::Magic qw/wizard cast VMG_OP_INFO_NAME/;
@@ -341,9 +341,9 @@
 
     This accessor fetches the private data associated with the magic $wiz
     (or the signature $sig) in the variable. It croaks when $wiz or $sig do
-    not represent a current valid magic object attached to the variable, and
-    returns "undef" when the wizard has no data constructor or when the data
-    is actually "undef".
+    not represent a valid magic object, and returns an empty list if no such
+    magic is attached to the variable or when the wizard has no data
+    constructor.
 
         # Get the attached data, or undef if the wizard does not attach any.
         my $data = getdata $x, $wiz;

Modified: trunk/libvariable-magic-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libvariable-magic-perl/debian/changelog?rev=39402&op=diff
==============================================================================
--- trunk/libvariable-magic-perl/debian/changelog (original)
+++ trunk/libvariable-magic-perl/debian/changelog Mon Jul  6 12:55:47 2009
@@ -1,3 +1,9 @@
+libvariable-magic-perl (0.36-1) UNRELEASED; urgency=low
+
+  * (NOT RELEASED YET) New upstream release
+
+ -- Live session user <ubuntu at ubuntu>  Mon, 06 Jul 2009 12:52:55 +0000
+
 libvariable-magic-perl (0.35-1) UNRELEASED; urgency=low
 
   [ Ansgar Burchardt ]

Modified: trunk/libvariable-magic-perl/lib/Variable/Magic.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libvariable-magic-perl/lib/Variable/Magic.pm?rev=39402&op=diff
==============================================================================
--- trunk/libvariable-magic-perl/lib/Variable/Magic.pm (original)
+++ trunk/libvariable-magic-perl/lib/Variable/Magic.pm Mon Jul  6 12:55:47 2009
@@ -13,13 +13,13 @@
 
 =head1 VERSION
 
-Version 0.35
+Version 0.36
 
 =cut
 
 our $VERSION;
 BEGIN {
- $VERSION = '0.35';
+ $VERSION = '0.36';
 }
 
 =head1 SYNOPSIS
@@ -401,7 +401,7 @@
     getdata [$@%&*]var, [$wiz|$sig]
 
 This accessor fetches the private data associated with the magic C<$wiz> (or the signature C<$sig>) in the variable.
-It croaks when C<$wiz> or C<$sig> do not represent a current valid magic object attached to the variable, and returns C<undef> when the wizard has no data constructor or when the data is actually C<undef>.
+It croaks when C<$wiz> or C<$sig> do not represent a valid magic object, and returns an empty list if no such magic is attached to the variable or when the wizard has no data constructor.
 
     # Get the attached data, or undef if the wizard does not attach any.
     my $data = getdata $x, $wiz;

Modified: trunk/libvariable-magic-perl/t/00-load.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libvariable-magic-perl/t/00-load.t?rev=39402&op=diff
==============================================================================
--- trunk/libvariable-magic-perl/t/00-load.t (original)
+++ trunk/libvariable-magic-perl/t/00-load.t Mon Jul  6 12:55:47 2009
@@ -13,7 +13,6 @@
 $p = $p ? 'patchlevel ' . $p : 'no patchlevel';
 diag( "Testing Variable::Magic $Variable::Magic::VERSION, Perl $] ($p), $^X" );
 
-if ($^O eq 'MSWin32' && eval { require Win32; 1 }
-                     && defined &Win32::BuildNumber) {
- diag "This is ActiveState Perl $] build " . Win32::BuildNumber();
+if (eval { require ActivePerl; 1 } and defined &ActivePerl::BUILD) {
+ diag "This is ActiveState Perl $] build " . ActivePerl::BUILD();
 }

Modified: trunk/libvariable-magic-perl/t/13-data.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libvariable-magic-perl/t/13-data.t?rev=39402&op=diff
==============================================================================
--- trunk/libvariable-magic-perl/t/13-data.t (original)
+++ trunk/libvariable-magic-perl/t/13-data.t Mon Jul  6 12:55:47 2009
@@ -78,9 +78,9 @@
 is($@, '', 'cast non-data wizard doesn\'t croak');
 ok($res,   'cast non-data wizard returns true');
 
-$data = eval { getdata $a, $wiz };
-is($@, '',       'getdata from non-data wizard doesn\'t croak');
-is($data, undef, 'getdata from non-data wizard invalid returns undef');
+my @data = eval { getdata $a, $wiz };
+is($@,            '',  'getdata from non-data wizard doesn\'t croak');
+is_deeply(\@data, [ ], 'getdata from non-data wizard invalid returns undef');
 
 $wiz = wizard data => sub { ++$_[1] };
 my ($di, $ei) = (1, 10);

Modified: trunk/libvariable-magic-perl/t/41-clone.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libvariable-magic-perl/t/41-clone.t?rev=39402&op=diff
==============================================================================
--- trunk/libvariable-magic-perl/t/41-clone.t (original)
+++ trunk/libvariable-magic-perl/t/41-clone.t Mon Jul  6 12:55:47 2009
@@ -3,31 +3,36 @@
 use strict;
 use warnings;
 
+sub skipall {
+ my ($msg) = @_;
+ require Test::More;
+ Test::More::plan(skip_all => $msg);
+}
+
 use Config qw/%Config/;
 
 BEGIN {
- if (!$Config{useithreads}) {
-  require Test::More;
-  Test::More->import;
-  plan(skip_all => 'This perl wasn\'t built to support threads');
- }
+ my $t_v  = '1.67';
+ my $ts_v = '1.14';
+ skipall 'This perl wasn\'t built to support threads'
+                                                    unless $Config{useithreads};
+ skipall "threads $t_v required to test thread safety"
+                                              unless eval "use threads $t_v; 1";
+ skipall "threads::shared $ts_v required to test thread safety"
+                                     unless eval "use threads::shared $ts_v; 1";
 }
 
-use threads; # Before Test::More
-use threads::shared;
-
-use Test::More;
+use Test::More; # after threads
 
 use Variable::Magic qw/wizard cast dispell getdata getsig VMG_THREADSAFE VMG_OP_INFO_NAME VMG_OP_INFO_OBJECT/;
 
-if (VMG_THREADSAFE) {
+BEGIN {
+ skipall 'This Variable::Magic isn\'t thread safe' unless VMG_THREADSAFE;
  plan tests => 2 * 3 + 4 * (2 * 10 + 2) + 4 * (2 * 7 + 2);
  my $v = $threads::VERSION;
  diag "Using threads $v" if defined $v;
  $v = $threads::shared::VERSION;
  diag "Using threads::shared $v" if defined $v;
-} else {
- plan skip_all => 'This Variable::Magic isn\'t thread safe';
 }
 
 my $destroyed : shared = 0;




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