--- trunk/lib/Frey/Shell/Grep.pm 2008/11/30 14:52:01 638 +++ trunk/lib/Frey/Shell/Grep.pm 2008/12/02 00:26:03 666 @@ -5,6 +5,8 @@ with 'Frey::Web'; #with 'Frey::Storage'; +use English; + has pattern => ( documentation => 'grep for pattern', is => 'rw', @@ -16,14 +18,13 @@ sub as_markup { my ($self) = @_; - my $patt = $self->pattern || 'FIXME'; + my $patt = $self->pattern; $self->title( $patt ); my $cmd = 'grep -rn ' . $patt . ' lib/ t/'; warn "# $cmd"; - my $html = qq|
$text
|;
$last_path = $path;
}
- close($fh) || die $!;
+ if ( $INPUT_LINE_NUMBER > 0 ) { # closing pipe grep output results in error
+ close($fh) || die "can't close pipe to $cmd $!";
+
+ $html = qq|
+