summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-02-02 07:53:51 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-02-02 07:53:51 +0000
commitdb376a245d40f9f81e37632708a9ad2cfc67ef6a (patch)
tree8c6efaa9d96c8eab8c80c68fe4e15d92aec8f7b4 /lib
parent65e1a3a11dd767e7393f37a7bd811ce587d64985 (diff)
downloadperl-db376a245d40f9f81e37632708a9ad2cfc67ef6a.tar.gz
use warnings rather than fiddling with $^W (from Paul Marquess)
p4raw-id: //depot/perl@4954
Diffstat (limited to 'lib')
-rw-r--r--lib/Cwd.pm2
-rw-r--r--lib/English.pm2
-rw-r--r--lib/ExtUtils/MM_Unix.pm2
-rw-r--r--lib/ExtUtils/MM_Win32.pm1
-rw-r--r--lib/ExtUtils/Manifest.pm2
-rw-r--r--lib/Fatal.pm2
-rw-r--r--lib/File/Spec/Win32.pm1
-rw-r--r--lib/Math/BigFloat.pm2
-rw-r--r--lib/Text/ParseWords.pm2
-rw-r--r--lib/utf8_heavy.pl2
10 files changed, 8 insertions, 10 deletions
diff --git a/lib/Cwd.pm b/lib/Cwd.pm
index 5a23911437..e3c45903c3 100644
--- a/lib/Cwd.pm
+++ b/lib/Cwd.pm
@@ -342,7 +342,7 @@ sub _qnx_abs_path {
}
{
- local $^W = 0; # assignments trigger 'subroutine redefined' warning
+ no warnings; # assignments trigger 'subroutine redefined' warning
if ($^O eq 'VMS') {
*cwd = \&_vms_cwd;
diff --git a/lib/English.pm b/lib/English.pm
index 9f29a487dc..9ed4fc8597 100644
--- a/lib/English.pm
+++ b/lib/English.pm
@@ -37,7 +37,7 @@ See L<perlvar> for a complete list of these.
=cut
-local $^W = 0;
+no warnings;
# Grandfather $NAME import
sub import {
diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm
index f4329e13d7..c5cf7066bf 100644
--- a/lib/ExtUtils/MM_Unix.pm
+++ b/lib/ExtUtils/MM_Unix.pm
@@ -2766,7 +2766,7 @@ sub parse_version {
$_
}; \$$2
};
- local($^W) = 0;
+ no warnings;
$result = eval($eval);
warn "Could not eval '$eval' in $parsefile: $@" if $@;
$result = "undef" unless defined $result;
diff --git a/lib/ExtUtils/MM_Win32.pm b/lib/ExtUtils/MM_Win32.pm
index 534f26d823..e08c6791ee 100644
--- a/lib/ExtUtils/MM_Win32.pm
+++ b/lib/ExtUtils/MM_Win32.pm
@@ -388,7 +388,6 @@ PM_TO_BLIB = }.join(" \\\n\t", %{$self->{PM}}).q{
sub path {
- local $^W = 1;
my($self) = @_;
my $path = $ENV{'PATH'} || $ENV{'Path'} || $ENV{'path'};
my @path = split(';',$path);
diff --git a/lib/ExtUtils/Manifest.pm b/lib/ExtUtils/Manifest.pm
index 58c91bc44b..8bb3fc8ebd 100644
--- a/lib/ExtUtils/Manifest.pm
+++ b/lib/ExtUtils/Manifest.pm
@@ -25,7 +25,7 @@ $MANIFEST = 'MANIFEST';
# Really cool fix from Ilya :)
unless (defined $Config{d_link}) {
- local $^W;
+ no warnings;
*ln = \&cp;
}
diff --git a/lib/Fatal.pm b/lib/Fatal.pm
index 12fef27d61..5b832f6427 100644
--- a/lib/Fatal.pm
+++ b/lib/Fatal.pm
@@ -116,7 +116,7 @@ EOS
no strict 'refs'; # to avoid: Can't use string (...) as a symbol ref ...
$code = eval("package $pkg; use Carp; $code");
die if $@;
- local($^W) = 0; # to avoid: Subroutine foo redefined ...
+ no warnings; # to avoid: Subroutine foo redefined ...
*{$sub} = $code;
}
}
diff --git a/lib/File/Spec/Win32.pm b/lib/File/Spec/Win32.pm
index 48ad8479c7..120b799cd2 100644
--- a/lib/File/Spec/Win32.pm
+++ b/lib/File/Spec/Win32.pm
@@ -81,7 +81,6 @@ sub catfile {
}
sub path {
- local $^W = 1;
my $path = $ENV{'PATH'} || $ENV{'Path'} || $ENV{'path'};
my @path = split(';',$path);
foreach (@path) { $_ = '.' if $_ eq '' }
diff --git a/lib/Math/BigFloat.pm b/lib/Math/BigFloat.pm
index 1a9195e185..d8d643ca3e 100644
--- a/lib/Math/BigFloat.pm
+++ b/lib/Math/BigFloat.pm
@@ -74,7 +74,7 @@ sub fnorm; sub fsqrt;
sub fnorm { #(string) return fnum_str
local($_) = @_;
s/\s+//g; # strip white space
- local $^W = 0; # $4 and $5 below might legitimately be undefined
+ no warnings; # $4 and $5 below might legitimately be undefined
if (/^([+-]?)(\d*)(\.(\d*))?([Ee]([+-]?\d+))?$/ && "$2$4" ne '') {
&norm(($1 ? "$1$2$4" : "+$2$4"),(($4 ne '') ? $6-length($4) : $6));
} else {
diff --git a/lib/Text/ParseWords.pm b/lib/Text/ParseWords.pm
index ada9d70d74..2a6afc3be9 100644
--- a/lib/Text/ParseWords.pm
+++ b/lib/Text/ParseWords.pm
@@ -49,7 +49,7 @@ sub nested_quotewords {
sub parse_line {
# We will be testing undef strings
- local($^W) = 0;
+ no warnings;
my($delimiter, $keep, $line) = @_;
my($quote, $quoted, $unquoted, $delim, $word, @pieces);
diff --git a/lib/utf8_heavy.pl b/lib/utf8_heavy.pl
index 0f588237eb..8649e9e07e 100644
--- a/lib/utf8_heavy.pl
+++ b/lib/utf8_heavy.pl
@@ -38,7 +38,7 @@ sub SWASHNEW {
if ($list) {
my @tmp = split(/^/m, $list);
my %seen;
- local $^W = 0;
+ no warnings;
$extras = join '', grep /^[^0-9a-fA-F]/, @tmp;
$list = join '',
sort { hex $a <=> hex $b }