summaryrefslogtreecommitdiff
path: root/regen
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2015-09-14 14:32:07 +1000
committerTony Cook <tony@develop-help.com>2015-10-12 14:55:52 +1100
commit4a21999a595cf89f78d57aa5b3fdf3fbfa638fb1 (patch)
tree852024f314be6fbf92c411103e12f8cc186698dc /regen
parent3d8ff82557d67bc81d10600b537a57f90f401a4f (diff)
downloadperl-4a21999a595cf89f78d57aa5b3fdf3fbfa638fb1.tar.gz
[perl #126051] make the warnings::enabled example use warnings::enabled
7e6d00f88633 added the warnif() function and changed most uses of warnings:enabled() to use warnif(), including this one. Revert just that part.
Diffstat (limited to 'regen')
-rw-r--r--regen/warnings.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/regen/warnings.pl b/regen/warnings.pl
index 6a07493624..18f337e03b 100644
--- a/regen/warnings.pl
+++ b/regen/warnings.pl
@@ -1144,8 +1144,10 @@ this snippet of code:
package MyMod::Abc;
sub open {
- warnings::warnif("deprecated",
- "open is deprecated, use new instead");
+ if (warnings::enabled("deprecated")) {
+ warnings::warn("deprecated",
+ "open is deprecated, use new instead");
+ }
new(@_);
}