Net-CLI-Interact

 view release on metacpan or  search on metacpan

lib/Net/CLI/Interact/Phrasebook.pm  view on Meta::CPAN

            if (m{^\s+put\s+(.+)$}) {
                my $value = $1;
                $value =~ s/^["']//; $value =~ s/["']$//;
                push @{ $data->{actions} }, {
                    type => 'send', value => $value, no_ors => 1,
                };
                next;
            }

            if (m{^\s+match\s+(.+)\s*$}) {
                my @vals = split m/\s+or\s+/, $1;
                if (scalar @vals) {
                    push @{ $data->{actions} },
                        {type => 'match', value => \@vals};
                    next;
                }
            }

            if (m{^\s+follow\s+/(.+)/\s+with\s+(.+)\s*$}) {
                my ($match, $send) = ($1, $2);
                $send =~ s/^["']//; $send =~ s/["']$//;

lib/Net/CLI/Interact/Role/Engine.pm  view on Meta::CPAN

        $self->logger->log('object', 'debug', $debug);
    }
}

sub last_response {
    my $self = shift;
    my $irs_re = $self->transport->irs_re;
    (my $resp = $self->last_actionset->item_at(-2)->response) =~ s/$irs_re/\n/g;
    $resp =~ s/\n+$//;
    return (wantarray
        ? (split m/^/, $resp)
        : ($resp ."\n"));
}

has 'default_continuation' => (
    is => 'rw',
    isa => InstanceOf['Net::CLI::Interact::ActionSet'],
    writer => '_default_continuation',
    predicate => 1,
    clearer => 1,
);



( run in 2.344 seconds using v1.01-cache-2.11-cpan-71847e10f99 )