Subject: | "no indirect" leaking again |
Date: | Wed, 15 Jul 2009 12:45:50 +0100 |
To: | bug-indirect [...] rt.cpan.org |
From: | Zefram <zefram [...] fysh.org> |
With indirect 0.16, the effect of "no indirect" is leaking into required
modules in some cases. It doesn't happen in the simplest cases:
$ perl -le 'no indirect ":fatal"; use Time::HiRes; print 1'
1
$
Time::HiRes does a "bootstrap Time::HiRes;", which is not being affected.
But in more complicated cases, with multiple modules, some doing
"no indirect" and requiring other modules, eventually I've had the
"bootstrap Time::HiRes;" fall over:
$ perl -MMy::Complicated::Module -le 'print 1'
Indirect call of method "bootstrap" on object "Time::HiRes" at /usr/local/lib/perl/5.10.0/Time/HiRes.pm line 65.
Compilation failed in require at ...
The minimum test case that I've got it down to involves three files (a
test script and two modules to require), each only a couple of lines long.
A tarball is attached. It fails thus:
$ perl indirect_leak.t
Indirect call of method "import" on object "A" at il2.pm line 2.
Compilation failed in require at indirect_leak.t line 3.
BEGIN failed--compilation aborted at indirect_leak.t line 3.
$
Anything shorter, such as omitting the no-op il1.pm module or collapsing
the "use" statements to direct code inclusion, causes the test to pass.
My perl version data is also attached.
-zefram
Message body not shown because it is not plain text.
Message body is not shown because sender requested not to inline it.