Revision history for Variable-Magic
+0.05 2007-11-19 09:10 UTC
+ + Fix : 5.10.0_RC1 compatibility fix.
+
0.04 2007-08-28 12:25 UTC
+ Chg : s/require (XSLoader)/use $1/.
+ Fix : Tests are now strict.
--- #YAML:1.0
name: Variable-Magic
-version: 0.04
+version: 0.05
abstract: Associate user-defined magic to variables from Perl.
license: perl
-generated_by: ExtUtils::MakeMaker version 6.36
+generated_by: ExtUtils::MakeMaker version 6.36_01
distribution_type: module
requires:
Carp: 0
w = SV2MGWIZ(wiz);
SvREFCNT_inc(wiz); /* Fake survival - it's gonna be deleted anyway */
-#if PERL_API_REVISION >= 5 && PERL_API_VERSION >= 9 && PERL_API_SUBVERSION >= 5
+#if PERL_API_REVISION > 5 || (PERL_API_REVISION == 5 && (PERL_API_VERSION > 9 || (PERL_API_VERSION == 9 && PERL_API_SUBVERSION >= 5)))
SvREFCNT_inc(wiz); /* One more push */
#endif
if (hv_delete(MY_CXT.wizz, buf, sprintf(buf, "%u", w->sig), 0)) {
Variable::Magic - Associate user-defined magic to variables from Perl.
VERSION
- Version 0.04
+ Version 0.05
SYNOPSIS
use Variable::Magic qw/wizard cast dispell/;
=head1 VERSION
-Version 0.04
+Version 0.05
=cut
-our $VERSION = '0.04';
+our $VERSION = '0.05';
=head1 SYNOPSIS
{
my $wiz = wizard get => \&foo,
set => $bar,
- free => sub { print STDERR "deleted!\n"; };
+ free => sub { print STDERR "deleted!\n"; };
$sig = getsig $wiz;
print "my sig is $sig\n";
cast $a, $wiz, qw/a b c/;
use strict;
use warnings;
-use Test::More tests => 14;
+use Test::More tests => 16;
use Variable::Magic qw/wizard gensig getsig cast dispell/;
ok(!$@, "re-dispell croaks ($@)");
ok($res, 're-dispell invalid');
+$res = eval { dispell my $b, $wiz };
+ok(!$@, "dispell non-magic object fails ($@)");
+ok($res == 0, 'dispell non-magic object doesn\'t return 0');
+
$sig = gensig;
{
my $wiz = wizard sig => $sig;