summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-02-05 18:53:18 +0000
committerNicholas Clark <nick@ccl4.org>2007-02-05 18:53:18 +0000
commit742dc32d6acf0f4dd57e97fd4c64104357557a1c (patch)
tree817a5258cafdaace69fe7a4a1051aaa7c6e14df7 /t
parent89345840bb76e556290106002463860f2482f768 (diff)
downloadperl-742dc32d6acf0f4dd57e97fd4c64104357557a1c.tar.gz
t/lib/common.pl can be warnings clean.
p4raw-id: //depot/perl@30136
Diffstat (limited to 't')
-rw-r--r--t/lib/common.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/lib/common.pl b/t/lib/common.pl
index e4c1463fae..36d45f3c99 100644
--- a/t/lib/common.pl
+++ b/t/lib/common.pl
@@ -9,6 +9,7 @@ use File::Path;
use File::Spec::Functions;
use strict;
+use warnings;
our $pragma_name;
$| = 1;
@@ -76,7 +77,7 @@ for (@prgs){
$todo = $prog =~ s/^#\s*TODO\s*(.*)\n//m and $todo_reason = $1;
# If the TODO reason starts ? then it's taken as a code snippet to evaluate
# This provides the flexibility to have conditional TODOs
- if ($todo_reason =~ s/^\?//) {
+ if ($todo_reason && $todo_reason =~ s/^\?//) {
my $temp = eval $todo_reason;
if ($@) {
die "# In TODO code reason:\n# $todo_reason\n$@";