r39400 - in /branches/upstream/libvariable-magic-perl/current: Changes META.yml Magic.xs Makefile.PL README 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:51:31 UTC 2009
Author: nhandler-guest
Date: Mon Jul 6 12:51:07 2009
New Revision: 39400
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=39400
Log:
[svn-upgrade] Integrating new upstream version, libvariable-magic-perl (0.36)
Modified:
branches/upstream/libvariable-magic-perl/current/Changes
branches/upstream/libvariable-magic-perl/current/META.yml
branches/upstream/libvariable-magic-perl/current/Magic.xs
branches/upstream/libvariable-magic-perl/current/Makefile.PL
branches/upstream/libvariable-magic-perl/current/README
branches/upstream/libvariable-magic-perl/current/lib/Variable/Magic.pm
branches/upstream/libvariable-magic-perl/current/t/00-load.t
branches/upstream/libvariable-magic-perl/current/t/13-data.t
branches/upstream/libvariable-magic-perl/current/t/41-clone.t
Modified: branches/upstream/libvariable-magic-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libvariable-magic-perl/current/Changes?rev=39400&op=diff
==============================================================================
--- branches/upstream/libvariable-magic-perl/current/Changes (original)
+++ branches/upstream/libvariable-magic-perl/current/Changes Mon Jul 6 12:51:07 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: branches/upstream/libvariable-magic-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libvariable-magic-perl/current/META.yml?rev=39400&op=diff
==============================================================================
--- branches/upstream/libvariable-magic-perl/current/META.yml (original)
+++ branches/upstream/libvariable-magic-perl/current/META.yml Mon Jul 6 12:51:07 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: branches/upstream/libvariable-magic-perl/current/Magic.xs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libvariable-magic-perl/current/Magic.xs?rev=39400&op=diff
==============================================================================
--- branches/upstream/libvariable-magic-perl/current/Magic.xs (original)
+++ branches/upstream/libvariable-magic-perl/current/Magic.xs Mon Jul 6 12:51:07 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: branches/upstream/libvariable-magic-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libvariable-magic-perl/current/Makefile.PL?rev=39400&op=diff
==============================================================================
--- branches/upstream/libvariable-magic-perl/current/Makefile.PL (original)
+++ branches/upstream/libvariable-magic-perl/current/Makefile.PL Mon Jul 6 12:51:07 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: branches/upstream/libvariable-magic-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libvariable-magic-perl/current/README?rev=39400&op=diff
==============================================================================
--- branches/upstream/libvariable-magic-perl/current/README (original)
+++ branches/upstream/libvariable-magic-perl/current/README Mon Jul 6 12:51:07 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: branches/upstream/libvariable-magic-perl/current/lib/Variable/Magic.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libvariable-magic-perl/current/lib/Variable/Magic.pm?rev=39400&op=diff
==============================================================================
--- branches/upstream/libvariable-magic-perl/current/lib/Variable/Magic.pm (original)
+++ branches/upstream/libvariable-magic-perl/current/lib/Variable/Magic.pm Mon Jul 6 12:51:07 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: branches/upstream/libvariable-magic-perl/current/t/00-load.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libvariable-magic-perl/current/t/00-load.t?rev=39400&op=diff
==============================================================================
--- branches/upstream/libvariable-magic-perl/current/t/00-load.t (original)
+++ branches/upstream/libvariable-magic-perl/current/t/00-load.t Mon Jul 6 12:51:07 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: branches/upstream/libvariable-magic-perl/current/t/13-data.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libvariable-magic-perl/current/t/13-data.t?rev=39400&op=diff
==============================================================================
--- branches/upstream/libvariable-magic-perl/current/t/13-data.t (original)
+++ branches/upstream/libvariable-magic-perl/current/t/13-data.t Mon Jul 6 12:51:07 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: branches/upstream/libvariable-magic-perl/current/t/41-clone.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libvariable-magic-perl/current/t/41-clone.t?rev=39400&op=diff
==============================================================================
--- branches/upstream/libvariable-magic-perl/current/t/41-clone.t (original)
+++ branches/upstream/libvariable-magic-perl/current/t/41-clone.t Mon Jul 6 12:51:07 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