develooper Front page | perl.perl5.porters | Postings from August 2003

[PATCH] Quieten more warnings in Deparse.pm

From:
Paul Johnson
Date:
August 27, 2003 15:14
Subject:
[PATCH] Quieten more warnings in Deparse.pm
Message ID:
20030827221359.GE28396@pjcj.net
Another in the occassional series of patches to keep Deparse quiet.
This is applicable to both blead and maint.  All tests pass for both.

--- ext/B/B/Deparse.pm.orig	2003-08-14 10:02:53.000000000 +0200
+++ ext/B/B/Deparse.pm	2003-08-27 23:31:49.000000000 +0200
@@ -2144,7 +2144,7 @@ sub listop {
     $first = "+$first" if not $parens and substr($first, 0, 1) eq "(";
     push @exprs, $first;
     $kid = $kid->sibling;
-    if ($proto =~ /^\*\*/ && $kid->name eq "rv2gv") {
+    if (defined $proto && $proto =~ /^\*\*/ && $kid->name eq "rv2gv") {
 	push @exprs, $self->deparse($kid->first, 6);
 	$kid = $kid->sibling;
     }

-- 
Paul Johnson - paul@pjcj.net
http://www.pjcj.net



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About