App-Termcast

 view release on metacpan or  search on metacpan

lib/App/Termcast.pm  view on Meta::CPAN

        my $_self = shift;
        weaken(my $self = $_self);
        # XXX using ::Callback for now because we need to be able to
        # instantiate App::Termcast objects without initializing the terminal
        # (in case of just calling write_to_termcast). This should
        # eventually be deprecated in favor of moving the termcast interaction
        # code out to an App::Termcast::Writer module or something, and
        # this module should be a simple wrapper that combines that module
        # with Term::Filter.
        Term::Filter::Callback->new(
            callbacks => {
                setup => sub {
                    my ($term) = @_;
                    $term->add_input_handle($self->socket);
                },
                winch => sub {
                    # for the sake of sending a clear to the client anyway
                    syswrite $self->output, "\e[H\e[2J";
                    $self->_needs_termsize_update(1);
                },
                read_error => sub {



( run in 0.580 second using v1.01-cache-2.11-cpan-9b1e4054eb1 )