summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2012-03-05 02:40:27 -0600
committerJesse Luehrs <doy@tozt.net>2012-03-05 02:45:05 -0600
commitee5757a609a54023cc4d431f1b79148b60700c22 (patch)
tree3cea4a589e24355c97afd167fc1325b6308b63b4
parent18b70f57a6c12d75099bf28b0258c52cda825848 (diff)
downloadterm-filter-ee5757a609a54023cc4d431f1b79148b60700c22.tar.gz
term-filter-ee5757a609a54023cc4d431f1b79148b60700c22.zip
stub out docs
-rw-r--r--lib/Term/Filter.pm90
1 files changed, 83 insertions, 7 deletions
diff --git a/lib/Term/Filter.pm b/lib/Term/Filter.pm
index 6af58fd..1e33725 100644
--- a/lib/Term/Filter.pm
+++ b/lib/Term/Filter.pm
@@ -8,11 +8,21 @@ use Moose::Util::TypeConstraints 'subtype', 'as', 'where', 'message';
use Scope::Guard ();
use Term::ReadKey ();
+=head1 SYNOPSIS
+
+=head1 DESCRIPTION
+
+=cut
+
subtype 'Term::Filter::TtyFileHandle',
as 'FileHandle',
where { -t $_ },
message { "Term::Filter requires input and output filehandles to be attached to a terminal" };
+=attr callbacks
+
+=cut
+
has callbacks => (
is => 'ro',
isa => 'HashRef[CodeRef]',
@@ -33,14 +43,9 @@ sub _has_callback {
return exists $self->callbacks->{$event};
}
-has pty => (
- is => 'ro',
- isa => 'IO::Pty::Easy',
- lazy => 1,
- builder => '_build_pty',
-);
+=attr input
-sub _build_pty { IO::Pty::Easy->new(raw => 0) }
+=cut
has input => (
is => 'ro',
@@ -51,6 +56,10 @@ has input => (
sub _build_input { \*STDIN }
+=attr output
+
+=cut
+
has output => (
is => 'ro',
isa => 'Term::Filter::TtyFileHandle',
@@ -60,6 +69,14 @@ has output => (
sub _build_output { \*STDOUT }
+=attr input_handles
+
+=cut
+
+=method add_input_handle
+
+=cut
+
has input_handles => (
traits => ['Array'],
isa => 'ArrayRef[FileHandle]',
@@ -77,6 +94,19 @@ sub _build_input_handles {
[ $self->input, $self->pty ]
}
+=attr pty
+
+=cut
+
+has pty => (
+ is => 'ro',
+ isa => 'IO::Pty::Easy',
+ lazy => 1,
+ builder => '_build_pty',
+);
+
+sub _build_pty { IO::Pty::Easy->new(raw => 0) }
+
has _select => (
is => 'ro',
isa => 'IO::Select',
@@ -106,6 +136,10 @@ has _raw_mode => (
},
);
+=method run
+
+=cut
+
sub run {
my $self = shift;
my @cmd = @_;
@@ -205,4 +239,46 @@ __PACKAGE__->meta->make_immutable;
no Moose;
no Moose::Util::TypeConstraints;
+=head1 BUGS
+
+No known bugs.
+
+Please report any bugs through RT: email
+C<bug-term-filter at rt.cpan.org>, or browse to
+L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Term-Filter>.
+
+=head1 SEE ALSO
+
+L<http://termcast.org/>
+
+=head1 SUPPORT
+
+You can find this documentation for this module with the perldoc command.
+
+ perldoc Term::Filter
+
+You can also look for information at:
+
+=over 4
+
+=item * AnnoCPAN: Annotated CPAN documentation
+
+L<http://annocpan.org/dist/Term-Filter>
+
+=item * CPAN Ratings
+
+L<http://cpanratings.perl.org/d/Term-Filter>
+
+=item * RT: CPAN's request tracker
+
+L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Term-Filter>
+
+=item * Search CPAN
+
+L<http://search.cpan.org/dist/Term-Filter>
+
+=back
+
+=cut
+
1;