This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
File::Copy Pod
[perl5.git] / lib / syslog.pl
index 9e03399..f0dbb1c 100644 (file)
 
 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';