From: Slaven Rezic Date: Mon, 8 Apr 2002 16:12:52 +0000 (+0200) Subject: example in pod/perllexwarn.pod X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7ddf7bb520763aec5b1b61ae724395b9cfbe9eae;p=p5sagit%2Fp5-mst-13.2.git example in pod/perllexwarn.pod Message-Id: <200204081412.g38ECqkX049116@vran.herceg.de> p4raw-id: //depot/perl@15804 --- diff --git a/pod/perllexwarn.pod b/pod/perllexwarn.pod index fd4b025..0edb2bc 100644 --- a/pod/perllexwarn.pod +++ b/pod/perllexwarn.pod @@ -371,8 +371,9 @@ Consider the module C below. sub open { my $path = shift ; - if (warnings::enabled() && $path !~ m#^/#) { - warnings::warn("changing relative path to /tmp/"); + if ($path !~ m#^/#) { + warnings::warn("changing relative path to /tmp/") + if warnings::enabled(); $path = "/tmp/$path" ; } }