Skip Menu |

This queue is for tickets about the Variable-Magic CPAN distribution.

Report information
The Basics
Id: 77991
Status: resolved
Priority: 0/
Queue: Variable-Magic

People
Owner: Nobody in particular
Requestors: GAAS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 0.49
Fixed in: 0.50



Subject: t/17-ctl.t fails on perl 5.14 and 5.16
Variable-Magic-0.49 fails to build for the ActivePerl PPM repo for perl-5.14 and 5.16 on Linux/OS X.  This failure is not seen on Windows.  Any idea what makes the difference?

$ perl -Mblib t/17-ctl.t

[...]

ok 40 - die in BEGIN in require in eval string triggers hints hash destructor
ok 41 - in hints hash destructor 2
ok 42 - die in BEGIN in eval triggers hints hash destructor
# Using Capture::Tiny 0.18
ok 43 - die in free callback at compile time and not in eval string
not ok 44 - die in free callback at compile time and not in eval string
#   Failed test 'die in free callback at compile time and not in eval string'
#   at t/17-ctl.t line 280.
#                   'salsify at -e line 1.
# Execution of -e aborted due to compilation errors.
# '
#     doesn't match '(?^:^salsify at \-e line \d+\.(?:
# salsify at -e line \d+.){12}
# Execution(?s:.*)$)'
# Looks like you failed 1 test of 44.
 
This test didn't fail on Windows because the test was skipped since Capture::Tiny was missing.
http://code.activestate.com/ppm/Variable-Magic/
The number of invocations of the fetch callback (with the die "salsify") seems to depend on what modules are loaded in the root namespace.  Running with -Mblib gave different results from running with the module installed for instance.  ActivePerl has some extra activity related to it's SITECUSTOMIZE and background invocations of ActiveState::Config.  I suggest you cast a diffent namespace to avoid these effects.  Patch attached.
Subject: 0001-There-are-more-fetches-from-the-root-namespace-than-.patch
From 603e5b0378c9bfae5c0b17e14a21d1cf82a43913 Mon Sep 17 00:00:00 2001 From: Gisle Aas <gisle@activestate.com> Date: Sun, 24 Jun 2012 15:30:51 -0700 Subject: [PATCH] There are more fetches from the root namespace than we care to test for --- t/17-ctl.t | 9 +-------- 1 files changed, 1 insertions(+), 8 deletions(-) diff --git a/t/17-ctl.t b/t/17-ctl.t index c32d7f1..933061e 100644 --- a/t/17-ctl.t +++ b/t/17-ctl.t @@ -266,17 +266,10 @@ SKIP: skip 'No working Capture::Tiny is installed'=> $count unless $has_capture_tiny; my $output = Capture::Tiny::capture_merged(sub { run_perl <<' CODE' }); -use Variable::Magic qw<wizard cast>; BEGIN { cast %::, wizard fetch => sub { die q[salsify] } } hlagh() +use Variable::Magic qw<wizard cast>; BEGIN { cast %foo::, wizard fetch => sub { die q[salsify] } } foo::hlagh() CODE skip 'Test code didn\'t run properly' => $count unless defined $output; my $suffix = "\nExecution(?s:.*)"; - if ("$]" >= 5.017) { - $suffix = "(?:\nsalsify at -e line \\d+.){16}" . $suffix; - } elsif ("$]" >= 5.011005) { - $suffix = "(?:\nsalsify at -e line \\d+.){12}" . $suffix; - } elsif ("$]" >= 5.011) { - $suffix = "(?:\nsalsify at -e line \\d+.){3}" . $suffix; - } like $output, expect('salsify', '-e', $suffix), 'die in free callback at compile time and not in eval string'; --$count; -- 1.7.0.5
Le Dim 24 Juin 2012 18:34:53, GAAS a écrit : Show quoted text
> The number of invocations of the fetch callback (with the die > "salsify") seems > to depend on what modules are loaded in the root namespace. Running > with -Mblib > gave different results from running with the module installed for > instance. > ActivePerl has some extra activity related to it's SITECUSTOMIZE and > background > invocations of ActiveState::Config. I suggest you cast a diffent > namespace to > avoid these effects. Patch attached.
Thanks for your report. While you were working on fixing this bug, I was also investigating it at the same time, and came to the same conclusions (though I hadn't thought of using another namespace). This issue should now be fixed in version 0.50. Vincent