r58048 - in /trunk/libvariable-magic-perl: Changes META.yml README debian/changelog debian/control debian/source/ debian/source/format lib/Variable/Magic.pm t/18-opinfo.t t/22-len.t t/30-scalar.t
angelabad-guest at users.alioth.debian.org
angelabad-guest at users.alioth.debian.org
Wed May 19 09:41:48 UTC 2010
Author: angelabad-guest
Date: Wed May 19 09:41:41 2010
New Revision: 58048
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=58048
Log:
New upstream release 0.42 - Ignore
Added:
trunk/libvariable-magic-perl/debian/source/
trunk/libvariable-magic-perl/debian/source/format
Modified:
trunk/libvariable-magic-perl/Changes
trunk/libvariable-magic-perl/META.yml
trunk/libvariable-magic-perl/README
trunk/libvariable-magic-perl/debian/changelog
trunk/libvariable-magic-perl/debian/control
trunk/libvariable-magic-perl/lib/Variable/Magic.pm
trunk/libvariable-magic-perl/t/18-opinfo.t
trunk/libvariable-magic-perl/t/22-len.t
trunk/libvariable-magic-perl/t/30-scalar.t
Modified: trunk/libvariable-magic-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libvariable-magic-perl/Changes?rev=58048&op=diff
==============================================================================
--- trunk/libvariable-magic-perl/Changes (original)
+++ trunk/libvariable-magic-perl/Changes Wed May 19 09:41:41 2010
@@ -1,4 +1,10 @@
Revision history for Variable-Magic
+
+0.42 2010-05-19 00:15 UTC
+ This is a maintenance release. The code contains no functional change.
+ Users of 0.41 can skip this update.
+ + Fix : Test failures with perl 5.13.
+ + Tst : Improve coverage.
0.41 2010-03-15 17:35 UTC
+ Doc : Tweaks and fixups.
Modified: trunk/libvariable-magic-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libvariable-magic-perl/META.yml?rev=58048&op=diff
==============================================================================
--- trunk/libvariable-magic-perl/META.yml (original)
+++ trunk/libvariable-magic-perl/META.yml Wed May 19 09:41:41 2010
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Variable-Magic
-version: 0.41
+version: 0.42
abstract: Associate user-defined magic to variables from Perl.
author:
- Vincent Pit <perl at profvince.com>
Modified: trunk/libvariable-magic-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libvariable-magic-perl/README?rev=58048&op=diff
==============================================================================
--- trunk/libvariable-magic-perl/README (original)
+++ trunk/libvariable-magic-perl/README Wed May 19 09:41:41 2010
@@ -2,7 +2,7 @@
Variable::Magic - Associate user-defined magic to variables from Perl.
VERSION
- Version 0.41
+ Version 0.42
SYNOPSIS
use Variable::Magic qw/wizard cast VMG_OP_INFO_NAME/;
Modified: trunk/libvariable-magic-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libvariable-magic-perl/debian/changelog?rev=58048&op=diff
==============================================================================
--- trunk/libvariable-magic-perl/debian/changelog (original)
+++ trunk/libvariable-magic-perl/debian/changelog Wed May 19 09:41:41 2010
@@ -1,3 +1,13 @@
+libvariable-magic-perl (0.42-1) UNRELEASED; urgency=low
+
+ IGNORE-VERSION: 0.42-1
+ Only changes in tests
+
+ * New upstream release
+ * Convert to source format 3.0 (quilt)
+
+ -- Angel Abad <angelabad at gmail.com> Wed, 19 May 2010 11:39:58 +0200
+
libvariable-magic-perl (0.41-1) unstable; urgency=low
* New upstream release
Modified: trunk/libvariable-magic-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libvariable-magic-perl/debian/control?rev=58048&op=diff
==============================================================================
--- trunk/libvariable-magic-perl/debian/control (original)
+++ trunk/libvariable-magic-perl/debian/control Wed May 19 09:41:41 2010
@@ -1,7 +1,7 @@
Source: libvariable-magic-perl
Section: perl
Priority: optional
-Build-Depends: debhelper (>= 7.0.50~), libtest-kwalitee-perl,
+Build-Depends: debhelper (>= 7.0.50), libtest-kwalitee-perl,
libtest-pod-coverage-perl, libtest-pod-perl, libtest-portability-files-perl,
perl
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
Added: trunk/libvariable-magic-perl/debian/source/format
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libvariable-magic-perl/debian/source/format?rev=58048&op=file
==============================================================================
--- trunk/libvariable-magic-perl/debian/source/format (added)
+++ trunk/libvariable-magic-perl/debian/source/format Wed May 19 09:41:41 2010
@@ -1,0 +1,1 @@
+3.0 (quilt)
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=58048&op=diff
==============================================================================
--- trunk/libvariable-magic-perl/lib/Variable/Magic.pm (original)
+++ trunk/libvariable-magic-perl/lib/Variable/Magic.pm Wed May 19 09:41:41 2010
@@ -13,13 +13,13 @@
=head1 VERSION
-Version 0.41
+Version 0.42
=cut
our $VERSION;
BEGIN {
- $VERSION = '0.41';
+ $VERSION = '0.42';
}
=head1 SYNOPSIS
Modified: trunk/libvariable-magic-perl/t/18-opinfo.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libvariable-magic-perl/t/18-opinfo.t?rev=58048&op=diff
==============================================================================
--- trunk/libvariable-magic-perl/t/18-opinfo.t (original)
+++ trunk/libvariable-magic-perl/t/18-opinfo.t Wed May 19 09:41:41 2010
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use Test::More tests => 14 * (3 + 4) + 5;
+use Test::More tests => 17 * (3 + 4) + 5;
use Config qw/%Config/;
@@ -11,19 +11,29 @@
sub Variable::Magic::TestPkg::foo { }
-my $aelem = $] <= 5.008003 ? 'aelem' : 'aelemfast';
-my $aelem_op = $Config{useithreads} ? 'B::PADOP' : 'B::SVOP';
+my $is_5130_release = ($] == 5.013 && !$Config{git_describe}) ? 1 : 0;
+
+my $aelem = $] <= 5.008003 ? 'aelem'
+ : ($] < 5.013 or $is_5130_release) ? 'aelemfast'
+ : 'sassign';
+my $aelemf = ($] < 5.013 or $is_5130_release) ? 'aelemfast' : 'sassign';
+my $aelemf_op = $aelemf eq 'sassign'
+ ? 'B::BINOP' : $Config{useithreads} ? 'B::PADOP' : 'B::SVOP';
our @o;
my @tests = (
[ 'len', '@c', 'my @c', 'my $x = @c', [ 'padav', 'B::OP' ] ],
[ 'get', '$c[0]', 'my @c', 'my $x = $c[0]', [ $aelem, 'B::OP' ] ],
- [ 'get', '$o[0]', 'local @o', 'my $x = $o[0]', [ 'aelemfast', $aelem_op ] ],
+ [ 'get', '$o[0]', 'local @o', 'my $x = $o[0]', [ $aelemf, $aelemf_op ] ],
[ 'get', '$c', 'my $c = 1', '++$c', [ 'preinc', 'B::UNOP' ] ],
[ 'get', '$c', 'my $c = 1', '$c ** 2', [ 'pow', 'B::BINOP' ] ],
[ 'get', '$c', 'my $c = 1', 'my $x = $c', [ 'sassign', 'B::BINOP' ] ],
[ 'get', '$c', 'my $c = 1', '1 if $c', [ 'and', 'B::LOGOP' ] ],
+ [ 'get', '$c', 'my $c = []','ref $c', [ 'ref', 'B::UNOP' ] ],
+ [ 'get', '$c', 'my $c = $0','-f $c', [ 'ftfile', 'B::UNOP' ] ],
+ [ 'get', '$c', 'my $c = "Z"',
+ 'my $i = 1; Z:goto $c if $i--', [ 'goto', 'B::UNOP' ] ],
[ 'set', '$c', 'my $c = 1', 'bless \$c, "main"',
[ 'bless', 'B::LISTOP' ] ],
[ 'get', '$c', 'my $c = ""','$c =~ /x/', [ 'match', 'B::PMOP' ] ],
Modified: trunk/libvariable-magic-perl/t/22-len.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libvariable-magic-perl/t/22-len.t?rev=58048&op=diff
==============================================================================
--- trunk/libvariable-magic-perl/t/22-len.t (original)
+++ trunk/libvariable-magic-perl/t/22-len.t Wed May 19 09:41:41 2010
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use Test::More tests => 33 + (2 * 2 + 1);
+use Test::More tests => 39 + (2 * 2 + 1);
use Variable::Magic qw/wizard cast dispell VMG_COMPAT_SCALAR_LENGTH_NOLEN/;
@@ -129,6 +129,35 @@
}
{
+ our $c;
+ # length magic on scalars needs also get magic to be triggered.
+ my $wiz = wizard get => sub { 0 },
+ len => sub { $d = $_[2]; ++$c; return $_[2] };
+
+ {
+ my $x = "banana";
+ cast $x, $wiz;
+
+ local $c = 0;
+ pos($x) = 2;
+ is $c, 1, 'len: pos scalar triggers magic correctly';
+ is $d, 6, 'len: pos scalar have correct default length';
+ is $x, 'banana', 'len: pos scalar works correctly'
+ }
+
+ {
+ my $x = "hl\x{20AB}gh"; # Force utf8 on string
+ cast $x, $wiz;
+
+ local $c = 0;
+ substr($x, 2, 1) = 'a';
+ is $c, 1, 'len: substr utf8 scalar triggers magic correctly';
+ is $d, 5, 'len: substr utf8 scalar have correct default length';
+ is $x, 'hlagh', 'len: substr utf8 scalar correctly';
+ }
+}
+
+{
my @val = (4 .. 6);
my $wv = init_value @val, 'len', 'len';
Modified: trunk/libvariable-magic-perl/t/30-scalar.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libvariable-magic-perl/t/30-scalar.t?rev=58048&op=diff
==============================================================================
--- trunk/libvariable-magic-perl/t/30-scalar.t (original)
+++ trunk/libvariable-magic-perl/t/30-scalar.t Wed May 19 09:41:41 2010
@@ -11,6 +11,8 @@
use lib 't/lib';
use Variable::Magic::TestWatcher;
+
+my $is_5130_release = ($] == 5.013 && !$Config{git_describe}) ? 1 : 0;
my $wiz = init_watcher
[ qw/get set len clear free copy dup local fetch store exists delete/ ],
@@ -58,7 +60,7 @@
watch { $a[1] = 6; () } { set => 1 }, 'array element: set';
-$b = watch { $a[1] } { get => 1 }, 'array element: get';
+$b = watch { $a[1] } { get => ($is_5130_release ? 2 : 1) },'array element: get';
is $b, 6, 'scalar: array element: get correctly';
watch { $a[0] = 5 } { }, 'array element: set other';
@@ -83,7 +85,7 @@
watch { $h{b} = 6; () } { set => 1 }, 'hash element: set';
-$b = watch { $h{b} } { get => 1 }, 'hash element: get';
+$b = watch { $h{b} } { get => ($is_5130_release ? 2 : 1) }, 'hash element: get';
is $b, 6, 'scalar: hash element: get correctly';
watch { $h{a} = 5 } { }, 'hash element: set other';
More information about the Pkg-perl-cvs-commits
mailing list