From: Jesse Vincent Date: Thu, 11 Feb 2010 02:05:08 +0000 (-0800) Subject: Note a change in warnings::register's behavior in 5.10 that wasn't documented at... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d99e543b6f3f9eca109ed354aa3777712b083294;p=p5sagit%2Fp5-mst-13.2.git Note a change in warnings::register's behavior in 5.10 that wasn't documented at the time. Resolves [perl #62522] --- diff --git a/pod/perl5100delta.pod b/pod/perl5100delta.pod index 263f158..8a46cf4 100644 --- a/pod/perl5100delta.pod +++ b/pod/perl5100delta.pod @@ -625,6 +625,27 @@ Previously, the exception would not occur until Perl attempted to make use of the recursive inheritance while resolving a method or doing a C<$foo-Eisa($bar)> lookup. +=head2 warnings::register changed to favor users of modules + +The behaviour in 5.10.x favors the person using the module; +The behaviour in 5.8.x favors the module writer; + +Assume the following code: + + main calls Foo::Bar::baz() + Foo::Bar inherits from Foo::Base + Foo::Bar::baz() calls Foo::Base::_bazbaz() + Foo::Base::_bazbaz() calls: warnings::warnif('substr', 'some warning +message'); + +On 5.8.x, the code warns when Foo::Bar contains C +It does not matter if Foo::Base or main have warnings enabled +to disable the warning one has to modify Foo::Bar. + +On 5.10.0 and newer, the code warns when main contains C +It does not matter if Foo::Base or Foo::Bar have warnings enabled +to disable the warning one has to modify main. + =head1 Modules and Pragmata =head2 Upgrading individual core modules