}
{
- local $^W = 0; # assignments trigger 'subroutine redefined' warning
+ no warnings; # assignments trigger 'subroutine redefined' warning
if ($^O eq 'VMS') {
*cwd = \&_vms_cwd;
=cut
-local $^W = 0;
+no warnings;
# Grandfather $NAME import
sub import {
$_
}; \$$2
};
- local($^W) = 0;
+ no warnings;
$result = eval($eval);
warn "Could not eval '$eval' in $parsefile: $@" if $@;
$result = "undef" unless defined $result;
sub path {
- local $^W = 1;
my($self) = @_;
my $path = $ENV{'PATH'} || $ENV{'Path'} || $ENV{'path'};
my @path = split(';',$path);
# Really cool fix from Ilya :)
unless (defined $Config{d_link}) {
- local $^W;
+ no warnings;
*ln = \&cp;
}
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;
}
}
}
sub path {
- local $^W = 1;
my $path = $ENV{'PATH'} || $ENV{'Path'} || $ENV{'path'};
my @path = split(';',$path);
foreach (@path) { $_ = '.' if $_ eq '' }
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 {
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);
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 }