Acme-use-strict-with-pride

 view release on metacpan or  search on metacpan

pride.pm  view on Meta::CPAN

      if (open my $fh, "<", $full) {
	# Dave made us do this too:
	my @lines = ("use strict; use warnings;\n", "#line 1 \"$full\"\n");
	# You didn't see this:
	return ($fh, sub {
	  # We really ought to (a) document or rescind this feature
	  # (b) if we document it, change the implementation to use filter
	  # simple
	  # (c) if so, check whether it falls foul of the subtle trap of
	  # caller-filter leaves some data in the buffer, and filter gets to see
	  # it in $_ for a second time.
	  if (@lines) {
	    push @lines, $_;
	    $_ = shift @lines;
	    return length $_;
	  }
	  return 0;
	});
      }
    }
    return;



( run in 2.478 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )