From: Nicholas Clark Date: Sat, 15 Apr 2006 18:08:04 +0000 (+0000) Subject: $foo .= $bar doesn't warn if $foo is undefined, so simplify code. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8498a5184cf05e744bf72b6e3f846f8deac7a425;p=p5sagit%2Fp5-mst-13.2.git $foo .= $bar doesn't warn if $foo is undefined, so simplify code. p4raw-id: //depot/perl@27817 --- diff --git a/t/op/incfilter.t b/t/op/incfilter.t index 650aa15..08d1eac 100644 --- a/t/op/incfilter.t +++ b/t/op/incfilter.t @@ -97,7 +97,7 @@ do [$fh, sub {tr/A-Za-z/N-ZA-Mn-za-m/; return;}] or die; my $count = 32; sub prepend_rot13_filter { filter_add(sub { - my $previous = defined $_ ? $_ : ''; + my $previous = $_; # Filters should append to any existing data in $_ # But (logically) shouldn't filter it twice. my $test = "fzrt!"; @@ -123,7 +123,7 @@ do [$fh, sub {tr/A-Za-z/N-ZA-Mn-za-m/; return;}] or die; my $amount = 1; sub prepend_block_counting_filter { filter_add(sub { - my $output = defined $_ ? $_ : ''; + my $output = $_; my $count = 256; while (--$count) { $_ = '';