AnyEvent-Subprocess
view release on metacpan or search on metacpan
lib/AnyEvent/Subprocess/Job/Delegate/Pty.pm view on Meta::CPAN
package AnyEvent::Subprocess::Job::Delegate::Pty;
BEGIN {
$AnyEvent::Subprocess::Job::Delegate::Pty::VERSION = '1.102912';
}
# ABSTRACT: give the child a pseudo-terminal
use IO::Pty;
use namespace::autoclean;
use Moose;
use POSIX qw(dup2);
with 'AnyEvent::Subprocess::Job::Delegate';
has 'want_leftovers' => (
is => 'ro',
isa => 'Bool',
default => 0,
);
has 'pty' => (
traits => ['NoClone'],
is => 'ro',
isa => 'IO::Pty',
lazy_build => 1,
);
has 'slave_pty' => (
traits => ['NoClone'],
is => 'ro',
lazy_build => 1,
);
has 'handle' => (
traits => ['NoClone'],
is => 'ro',
isa => 'AnyEvent::Subprocess::Handle',
lazy_build => 1,
);
has 'handle_class' => (
is => 'ro',
isa => 'ClassName',
required => 1,
default => sub {
require AnyEvent::Subprocess::Handle;
return 'AnyEvent::Subprocess::Handle';
},
);
sub __build_handle {
my ($self, $fh, @rest) = @_;
return $self->handle_class->new( fh => $fh, @rest );
}
has 'run_delegate_class' => (
is => 'ro',
isa => 'ClassName',
required => 1,
default => sub {
require AnyEvent::Subprocess::Running::Delegate::Handle;
return 'AnyEvent::Subprocess::Running::Delegate::Handle';
},
);
has 'redirect_handles' => (
is => 'ro',
isa => 'ArrayRef[GlobRef]',
( run in 2.582 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )