in reply to Re: I don't care about *your* warnings!
in thread I don't care about *your* warnings!

The docs on warnings aren't particularly clear on this point to me.

It looks like warnings::register allows me to define a new class of warnings (with the same name as the module). But "uninit value" is already in a class so would disabling the "Contextual::Return" class of warnings disable "uninit value" warnings that come from the Contextual::Return package?

It looks like it only works to disable warnings when the package goes out of its way to use things like warnings::warnif(...) and so I'm doubtful that it has any impact on the warnings being discussed here.

Sorry, I don't have the time/motivation at the moment to construct test cases to answer this question myself (for my version of things, anyway); but I am interested in coming back later and reading more about this. (:

- tye        

  • Comment on Re^2: I don't care about *your* warnings! (register)

Replies are listed 'Best First'.
Re^3: I don't care about *your* warnings! (register)
by ikegami (Patriarch) on Feb 28, 2007 at 21:07 UTC
    I ran some tests, and warnif (and similar constructs) is the only thing affected.

    Update: Specifically,

    • no warnings 'OtherModule'; has no effect on builtin warnings.
    • use warnings 'OtherModule'; has no effect on builtin warnings.
    • use warnings 'OtherModule'; has no effect on warn warnings.
    • no warnings 'OtherModule'; has no effect on warn warnings.
    • use warnings 'OtherModule'; in the caller enables warnings::warnif warnings in the module.
    • no warnings 'OtherModule'; in the caller disables warnings::warnif warnings in the module.
    • use warnings 'OtherModule'; in the module has no effect.
    • no warnings 'OtherModule'; in the module has no effect.
    • use warnings; in the caller enables warnings::warnif warnings in the module.
    • no warnings; in the caller disables warnings::warnif warnings in the module.
    • use warnings; in the module has no effect on warnings::warnif warnings in the module.
    • no warnings; in the module has no effect on warnings::warnif warnings in the module.