summaryrefslogtreecommitdiff
path: root/lib/warnings.pm
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-02-06 18:16:57 +0000
committerNicholas Clark <nick@ccl4.org>2010-06-23 08:33:17 +0100
commitf0a8fd683c572d39673f9b0a22fd4919c1bed5a7 (patch)
tree6ee6b21f8e6871da2fa25ef8f22898af53a2b80e /lib/warnings.pm
parent855e1b218209c43f6f8afc4589cbf85724b81ded (diff)
downloadperl-f0a8fd683c572d39673f9b0a22fd4919c1bed5a7.tar.gz
Some tiding of warnings::__chk().
Remove my $this_pkg, rendered unused by 4f527b719ae89076. Move $pkg inside the if() block. Don't needlessly assign to $i.
Diffstat (limited to 'lib/warnings.pm')
-rw-r--r--lib/warnings.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/warnings.pm b/lib/warnings.pm
index defc20890b..10a7cbfe4e 100644
--- a/lib/warnings.pm
+++ b/lib/warnings.pm
@@ -458,11 +458,11 @@ sub __chk
unless defined $offset ;
}
- my $this_pkg = (caller(1))[0] ;
- my $i = 2 ;
- my $pkg ;
+ my $i;
if ($isobj) {
+ my $pkg;
+ $i = 2;
while (do { { package DB; $pkg = (caller($i++))[0] } } ) {
last unless @DB::args && $DB::args[0] =~ /^$category=/ ;
}