In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/f0a8fd683c572d39673f9b0a22fd4919c1bed5a7?hp=855e1b218209c43f6f8afc4589cbf85724b81ded>

- Log -----------------------------------------------------------------
commit f0a8fd683c572d39673f9b0a22fd4919c1bed5a7
Author: Nicholas Clark <[email protected]>
Date:   Sat Feb 6 18:16:57 2010 +0000

    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.
-----------------------------------------------------------------------

Summary of changes:
 lib/warnings.pm |    6 +++---
 warnings.pl     |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/warnings.pm b/lib/warnings.pm
index defc208..10a7cbf 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=/ ;
         }
diff --git a/warnings.pl b/warnings.pl
index 514ccd7..59d8652 100644
--- a/warnings.pl
+++ b/warnings.pl
@@ -743,11 +743,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=/ ;
         }

--
Perl5 Master Repository

Reply via email to