[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl-qa
Subject:    Re: Module::Install and Test::NoWarnings- "require Test::NoWarnigs" should not hide warnings.
From:       "Fergal Daly" <fergal () esatclear ! ie>
Date:       2008-12-29 20:51:58
Message-ID: 875029960812291251h5b89968dv6435e54c8ccc5dca () mail ! gmail ! com
[Download RAW message or body]

I've made an rt.cpan.org ticket out of this which is the best service
I can manage at the moment, sorry,

F

2008/12/23 Gabor Szabo <szabgab@gmail.com>:
> In the Padre project we encountered some strange behavior.
> We recently switched to use Module::Install and we also use Test:::NoWarnings
> in our tests.
>
> It seems Module::Install loads all the modules listed as "requires" or
> "test_requires"
> during the execution of Makefile.PL
>
>
> This brought up the question what happens when Test::NoWarnings is
> "require"-d and
> not "use"-d. As I can see from the code, the import() call is what
> generated the
> additional test in the END block. So that part behaves nicely.
> On the other hand Test:::NoWarnings still hides all the warnings in such case.
> Specifically it hides the warnings Makefile.PL generates when some of
> the modules
> are missing or are at a version lower than required.
>
> So I think - besides the fact that M::I probably should not load the
> required modules
> to memory - "require Test::NoWarnigs" should not hide warnings.
>
>
> As a workaround now, I added the following lines to the beginning of
> our Makefile.PL
>
> eval  {
>        require Test::NoWarnings;
>        $SIG{__WARN__} = 'DEFAULT';
> };
>
>
>
> regards
>   Gabor
>
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic