Hey, this is a wierd problem and I really haven't been able to figure out why it's happening, so maybe some of you monks can help!

I've implemented a module that happens to have a __WARN__ signal handler (let's call it TheLoader) and a universal autoloader:
package TheLoader; BEGIN { $SIG{__WARN__} = sub { return if $_[0] =~ /inherited AUTOLOAD/; print STDERR @_; }; } package UNIVERSAL sub AUTOLOAD { ... }
All of my other modules use this package. I also have a few .cgi files that just use the modules they need (they don't use TheLoader directly, but they all use at least one module that uses TheLoader)

When I load up a .cgi file through the web server (apache), I end up getting the warnings I'm trying to suppress.
Use of inherited AUTOLOAD for non-method Foo::Bar::getSomething() is d +eprecated at ....Test.pm line 200 (#1) ....
I would have thought that my signal handler for __WARN__ would have handled this signal correctly. I've seen it suppress other warnings from running my tests, but with this setup it's not.

Anyone have clues? Many thanks.

In reply to handling __WARN__ funkiness by xevian

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.