Permalink
Browse files

removed my phony App::Ack::STDIN subclass

  • Loading branch information...
petdance
petdance committed Jul 11, 2008
1 parent bef25c7 commit 00c1f8bd8215e37258ba2bf7bde537559b8e1340
Showing with 2 additions and 52 deletions.
  1. +0 −22 Ack.pm
  2. +1 −1 ack
  3. +1 −23 ack-standalone
  4. +0 −1 t/standalone.t
  5. +0 −5 tags
View
22 Ack.pm
@@ -1467,26 +1467,4 @@ under the same terms as Perl itself.
=cut
-package App::Ack::STDIN;
-
-sub new {
- my $class = shift;
- return bless {}, $class;
-}
-
-sub name { return '-' }
-sub next_text {
- my $self = shift;
-
- my $line = <STDIN>;
- if ( defined $line ) {
- return ($line,$.);
- }
- return;
-}
-
-sub close {
- return;
-}
-
1; # End of App::Ack
View
2 ack
@@ -61,7 +61,7 @@ sub main {
my $s = $nargs == 1 ? '' : 's';
App::Ack::warn( "Ignoring $nargs argument$s on the command-line while acting as a filter." );
}
- my $res = App::Ack::STDIN->new();
+ my $res = App::Ack::Resource->new( '-' );
App::Ack::search_resource( $res, $opt );
exit 0;
}
View
@@ -64,7 +64,7 @@ sub main {
my $s = $nargs == 1 ? '' : 's';
App::Ack::warn( "Ignoring $nargs argument$s on the command-line while acting as a filter." );
}
- my $res = App::Ack::STDIN->new();
+ my $res = App::Ack::Resource->new( '-' );
App::Ack::search_resource( $res, $opt );
exit 0;
}
@@ -2220,28 +2220,6 @@ sub set_up_pager {
}
-package App::Ack::STDIN;
-
-sub new {
- my $class = shift;
- return bless {}, $class;
-}
-
-sub name { return '-' }
-sub next_text {
- my $self = shift;
-
- my $line = <STDIN>;
- if ( defined $line ) {
- return ($line,$.);
- }
- return;
-}
-
-sub close {
- return;
-}
-
1; # End of App::Ack
package App::Ack::Repository;
View
@@ -25,7 +25,6 @@ FIND_PACKAGES: {
my @expected = (
'package File::Next;',
'package App::Ack;',
- 'package App::Ack::STDIN;',
'package App::Ack::Repository;',
'package App::Ack::Resource;',
);
View
5 tags
@@ -24,7 +24,6 @@ App::Ack Ack.pm /^package App::Ack;$/;" p
App::Ack::Plugin Plugin.pm /^package App::Ack::Plugin;$/;" p
App::Ack::Repository Repository.pm /^package App::Ack::Repository;$/;" p
App::Ack::Resource Resource.pm /^package App::Ack::Resource;$/;" p
-App::Ack::STDIN Ack.pm /^package App::Ack::STDIN;$/;" p
BACK_ANCHOR t/ack-g.t /^BACK_ANCHOR: {$/;" l
BEFORE t/context.t /^BEFORE: {$/;" l
BEFORE_WITH_LINE_NO t/context.t /^BEFORE_WITH_LINE_NO: {$/;" l
@@ -165,7 +164,6 @@ check_stderr t/ack-type.t /^sub check_stderr {$/;" s
check_u t/ack-u.t /^sub check_u {$/;" s
check_with t/ack-type.t /^sub check_with {$/;" s
check_with t/file-permission.t /^sub check_with {$/;" s
-close Ack.pm /^sub close {$/;" s
close Repository.pm /^sub close {$/;" s
close Resource.pm /^sub close {$/;" s
critic Makefile.PL /^critic:$/;" l
@@ -197,14 +195,11 @@ lists_match t/Util.pm /^sub lists_match {$/;" s
load_colors Ack.pm /^sub load_colors {$/;" s
main Makefile.PL /^package main;$/;" p
main ack /^sub main {$/;" s
-name Ack.pm /^sub name { return '-' }$/;" s
name Resource.pm /^sub name {$/;" s
needs_line_scan Ack.pm /^sub needs_line_scan {$/;" s
-new Ack.pm /^sub new {$/;" s
new Repository.pm /^sub new {$/;" s
new Resource.pm /^sub new {$/;" s
next_resource Repository.pm /^sub next_resource {$/;" s
-next_text Ack.pm /^sub next_text {$/;" s
next_text Resource.pm /^sub next_text {$/;" s
nytprof Makefile.PL /^nytprof: all$/;" l
option_in_usage t/longopts.t /^sub option_in_usage {$/;" s

0 comments on commit 00c1f8b

Please sign in to comment.