in reply to Test::Harness and uninitialized value in eval

I get the warnings with Test::Harness

perl -Iblib\lib -Iblib\arch -MTest::Harness -e"runtests('t/01-init_and +_accessors.t')"

And without

perl -w -Iblib\lib -Iblib\arch t/01-init_and_accessors.t

So it's not a Test::Harness issue. The reason you didn't see the problem before using Test::Harness is that Test::Harness turns on the display of warnings. It's not the cause of them. Looks like XML::Twig is buggy or isn't being called properly.

Replies are listed 'Best First'.
Re^2: Test::Harness and uninitialized value in eval
by AZed (Monk) on Nov 22, 2008 at 14:50 UTC

    Oh, I see... warnings were turned off in XML::Twig or some other module that I'm calling and the global '-w' is turning them back on... Somehow I was expecting all major modules to have warnings turned on already, so I kept thinking of '-w' as redundant, and never tried it.

    Now that I can reproduce it by hand I've tracked down at least one of the spew causes to XML::Twig::first_elt, so I'll go file a bug on that. Thanks.