summaryrefslogtreecommitdiffstats
path: root/contrib/perl5/lib/syslog.pl
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/perl5/lib/syslog.pl')
-rw-r--r--contrib/perl5/lib/syslog.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/perl5/lib/syslog.pl b/contrib/perl5/lib/syslog.pl
index 9e03399..70c439b 100644
--- a/contrib/perl5/lib/syslog.pl
+++ b/contrib/perl5/lib/syslog.pl
@@ -29,10 +29,12 @@
package syslog;
+use warnings::register;
+
$host = 'localhost' unless $host; # set $syslog'host to change
-if ($] >= 5) {
- warn "You should 'use Sys::Syslog' instead; continuing" # if $^W
+if ($] >= 5 && warnings::enabled()) {
+ warnings::warn "You should 'use Sys::Syslog' instead; continuing";
}
require 'syslog.ph';
OpenPOWER on IntegriCloud