From ee5757a609a54023cc4d431f1b79148b60700c22 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 5 Mar 2012 02:40:27 -0600 Subject: stub out docs --- lib/Term/Filter.pm | 90 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file 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, or browse to +L. + +=head1 SEE ALSO + +L + +=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 + +=item * CPAN Ratings + +L + +=item * RT: CPAN's request tracker + +L + +=item * Search CPAN + +L + +=back + +=cut + 1; -- cgit v1.2.3