develooper Front page | perl.qa | Postings from January 2008

[PATCH] warnings in TAP::Parser

From:
Rafael Garcia-Suarez
Date:
January 28, 2008 06:11
Subject:
[PATCH] warnings in TAP::Parser
Message ID:
b77c1dce0801280611l6594a911mc449d9113e7e0fef@mail.gmail.com
I've applied the following patch to TAP::Parser in bleadperl, where it
was necessary to avoid a "Use of uninitialized value in uc" warning.

Also, I found that it was unnecessary to uc() a parameter both
before and after it was passed to an internal method.

Change 33092 by rgs@stcosmo on 2008/01/28 14:06:59

	Warning cleanup, and avoid a double call to uc

Affected files ...

... //depot/perl/lib/TAP/Parser/Grammar.pm#4 edit

Differences ...

==== //depot/perl/lib/TAP/Parser/Grammar.pm#4 (text) ====

@@ -133,7 +133,7 @@
                 }
                 return $self->_make_test_token(
                     $line,   $ok, $num, $desc,
-                    uc $dir, $explanation
+                    $dir, $explanation
                 );
             },
         },
@@ -372,7 +372,7 @@
         ok          => $ok,
         test_num    => $num,
         description => _trim($desc),
-        directive   => uc($dir),
+        directive   => uc($dir || ""),
         explanation => _trim($explanation),
         raw         => $line,
         type        => 'test',



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