<URL: https://rt.cpan.org/Ticket/Display.html?id=54825 >

On Sat Feb 20 14:01:05 2010, JAWNSY wrote:
> Hi there,
> 
> While trying to build the latest version of Inline for Debian (where 
it
> is packaged as libinline-perl), I encountered several warnings and
> suspicious diagnostic output during testing. As far as I can tell from
> the toolchain output, there were no dependencies missing during build.
> 
> What follows is the test output:
> 
>    dh_auto_test
> make[1]: Entering directory
> `/build/jon-libinline-perl_0.46-1-i386-lJq_CL/libinline-perl-0.46'
> make[2]: Entering directory
> `/build/jon-libinline-perl_0.46-1-i386-lJq_CL/libinline-perl-0.46/C'
> make[2]: Leaving directory
> `/build/jon-libinline-perl_0.46-1-i386-lJq_CL/libinline-perl-0.46/C'
> PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
> "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
> t/00init.t .... ok
> t/01usages.t .. ok
> t/02config.t .. ok
> t/03errors.t .. ok
> t/04create.t .. ok
> t/05files.t ... skipped: (no reason given)
> All tests successful.
> Files=6, Tests=14, 11 wallclock secs ( 0.04 usr  0.02 sys +  0.50 
cusr 
> 0.10 csys =  0.66 CPU)
> Result: PASS
> make[2]: Entering directory
> `/build/jon-libinline-perl_0.46-1-i386-lJq_CL/libinline-perl-0.46/C'
> PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
> "test_harness(0, '../blib/lib', '../blib/arch')" t/*.t
> t/00init.t ........... ok
> t/01syntax.t ......... ok
> t/02config.t ......... ok
> t/03typemap.t ........ ok
> t/04perlapi.t ........ ok
> t/05xsmode.t ......... ok
> Subroutine Inline::C::get_parser redefined at ../blib/lib/Inline.pm 
line
> 312 (#1)
>     (W redefine) You redefined a subroutine.  To suppress this 
warning, say
>     
>         {
>         no warnings 'redefine';
>         eval "sub name { ... }";
>         }
>    
> t/06parseregexp.t .... ok
> Subroutine Inline::C::get_parser redefined at ../blib/lib/Inline.pm 
line
> 312 (#1)
>     (W redefine) You redefined a subroutine.  To suppress this 
warning, say
>     
>         {
>         no warnings 'redefine';
>         eval "sub name { ... }";
>         }
>     
> t/07typemap_multi.t .. ok
> In Inline::env_untaint() : Blindly untainting tainted fields in %ENV.
> In Inline::env_untaint() : Blindly untainting tainted fields in %ENV.
> In Inline::obj_untaint() : Blindly untainting tainted fields in Inline
> object.
> In Inline::env_untaint() : Blindly untainting tainted fields in %ENV.
> In Inline::env_untaint() : Blindly untainting tainted fields in %ENV.
> In Inline::obj_untaint() : Blindly untainting tainted fields in Inline
> object.
> In Inline::env_untaint() : Blindly untainting tainted fields in %ENV.
> In Inline::env_untaint() : Blindly untainting tainted fields in %ENV.
> In Inline::obj_untaint() : Blindly untainting tainted fields in Inline
> object.
> In Inline::env_untaint() : Blindly untainting tainted fields in %ENV.
> In Inline::env_untaint() : Blindly untainting tainted fields in %ENV.
> In Inline::obj_untaint() : Blindly untainting tainted fields in Inline
> object.
> t/08taint.t .......... ok
> All tests successful.
> Files=9, Tests=21, 13 wallclock secs ( 0.02 usr  0.02 sys +  9.50 
cusr 
> 3.24 csys = 12.78 CPU)
> Result: PASS
> 
> This regression appears to have been introduced in version 0.46;
> rebuilding 0.45 with the most recent perl and other dependencies 
yields
> the following test output:
> 
>    dh_auto_test
> make[1]: Entering directory
> `/build/jon-libinline-perl_0.45-1-i386-dvYTxJ/libinline-perl-0.45'
> make[2]: Entering directory
> `/build/jon-libinline-perl_0.45-1-i386-dvYTxJ/libinline-perl-0.45/C'
> make[2]: Leaving directory
> `/build/jon-libinline-perl_0.45-1-i386-dvYTxJ/libinline-perl-0.45/C'
> PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
> "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
> t/00init.t .... ok
> t/01usages.t .. ok
> t/02config.t .. ok
> t/03errors.t .. ok
> t/04create.t .. ok
> t/05files.t ... skipped: (no reason given)
> All tests successful.
> Files=6, Tests=14, 10 wallclock secs ( 0.04 usr  0.02 sys +  0.56 
cusr 
> 0.06 csys =  0.68 CPU)
> Result: PASS
> make[2]: Entering directory
> `/build/jon-libinline-perl_0.45-1-i386-dvYTxJ/libinline-perl-0.45/C'
> PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
> "test_harness(0, '../blib/lib', '../blib/arch')" t/*.t
> t/00init.t ........... ok
> t/01syntax.t ......... ok
> t/02config.t ......... ok
> t/03typemap.t ........ ok
> t/04perlapi.t ........ ok
> t/05xsmode.t ......... ok
> t/06parseregexp.t .... ok
> t/07typemap_multi.t .. ok
> All tests successful.
> Files=8, Tests=16, 10 wallclock secs ( 0.04 usr  0.02 sys +  7.00 
cusr 
> 2.48 csys =  9.54 CPU)
> Result: PASS

The "suspicious diagnostic output" is just the standard "use 
diagnostics;" ouptut - assuming I've correctly identified the output 
you're referring to :-) 

The redefinition warnings come about as a result of "fixing" #49669:
https://rt.cpan.org/Public/Bug/Display.html?id=49669

Basically, I think we could silence the warnings in one of 2 ways:

1) Fix #49669 in such a way that get_parser() does not get redefined;
2) Take the advice of the diagnostics message and wrap the offending 
code in a "no_warnings 'redefine';" block.

Solution 1) would be preferable - patches welcome.
In the meantime I would prefer to keep the warning (which happens only 
at build time, btw) in place. I can't be entirely sure that this "fix" 
does not break something else - and if it *does* break something else, 
then the warning possibly serves as a significant aid in tracking down 
the cause of the problem. I would be really pissed off if I spent hours 
tracking down a bug that could have been solved in minutes if not for a 
certain piece of code having been placed in a "no warnings 'redefine';" 
block.

The "no warnings" approach would also mean that Inline would have 
to "require 5.006;" rather than "require 5.005;" as is currently the 
case. (Requiring 5.006 wouldn't bother me in the slightest - so long as 
Ingy is happy with that. Faik, there might already be code in place 
that prevents Inline building on 5.005.)

The "untaint" warnings come about as a result of fixing #13084:
https://rt.cpan.org/Public/Bug/Display.html?id=13084

As the warnings indicate, untainting involves "blindly untainting" %ENV 
and Inline objects. It would be irresponsible, imo, to do that without 
issuing those warnings (which will be seen whenever the script is run).
There is an option for a user to silence them by setting the config 
option NO_UNTAINT_WARN. (I'm now actually wondering whether I should 
have provided that option.)

Cheers,
Rob

Reply via email to