X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fsyslog.pl;h=f0dbb1c96a2078a8d4401eb084b6c9cf723ffb2d;hb=7b9ef14019d3c4d1aa14641dbd421c81c2cd18a4;hp=9e03399e4df608371ccf957a03fbae2ecbea9afc;hpb=36477c247f3c188fb8cc7e276c87b739d3e6ab7c;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/syslog.pl b/lib/syslog.pl index 9e03399..f0dbb1c 100644 --- a/lib/syslog.pl +++ b/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';