This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
$foo .= $bar doesn't warn if $foo is undefined, so simplify code.
authorNicholas Clark <nick@ccl4.org>
Sat, 15 Apr 2006 18:08:04 +0000 (18:08 +0000)
committerNicholas Clark <nick@ccl4.org>
Sat, 15 Apr 2006 18:08:04 +0000 (18:08 +0000)
p4raw-id: //depot/perl@27817

t/op/incfilter.t

index 650aa15..08d1eac 100644 (file)
@@ -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) {
                       $_ = '';