Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

documentation unclear on continuation behaviour, and macro that matches first then sends #26

Open
ollyg opened this issue Sep 20, 2017 · 1 comment

Comments

@ollyg
Copy link
Owner

ollyg commented Sep 20, 2017

Migrated from rt.cpan.org #121524 (status was 'new')

Requestors:

From [email protected] on 2017-05-04 05:22:22:

  1. Manual/Cookbook.pod
    states that continuation can be inline (mentioned elsewhere, too)
    or with a macro that starts with a match, giving the example macro
    more_pages.

the rest of the docs doesn't mention this match-then-send macro format
anywhere, for example lib/Net/CLI/Interact/Phrasebook.pm does not include any
hint of that syntax or the intended behaviour.

question: does a macro with match-then-send allow multiple rounds,
like normal macros do?
ie. is macro thing, match prompt1, send x, match prompt2,
send y, [implicit or explicit last match someprompt], supported or not?

question: the cookbook pod says the send in match-then-send doesn't get
an ors attached, the phrasebook.pm page does not say anything about when
ors is not attached, just 'normally all sent stuff gets it'.
which one is correct?

question: does a macro with match-then-send support
using a named prompt instead of the inline regex?
ie. macro more_pages, match indicator_name, send 'some trigger text'

qustion: does a continuation macro with match-then-send automatically
apply once or N times?

question: does a macro with match-then-send support 'or' with named
prompts, or just one single inline regex as in the cookbook example?

question: how does a macro with match-then-send react to the match
not triggering at all? does it not send anything then? does n::c::i return
a failure instead?
or is a continuation macro with match-then-send always matching
the given regex in parallel with an implicit or explicit last match?

same question for inline follow macros:
how does an in-line "follow /trigger/ with 'sendme'" react to no trigger match?
does it automatically match some implicit other prompt instead? the
phrasebook.pm pod seems to imply that, but can a match-then-send macro set its
own, final, prompt? what about the /trigger/ being present again after
sendme has been issued? is in-line continuation supported
together with multiple send-match-send-match
sequences or not?

  1. Manual/Cookbook.pod says metachars like \n are supported in continuations,
    and so does the pod of lib/Net/CLI/Interact/Phrasebook.pm.
    question: are metachars supported everywhere, or just in continuations?

regards
az

--
Alexander Zangerl
email: [email protected]
skype: alex.zangerl
mobile: +61 415 482 341
web: https://community.opmantek.com/

@rcasallas
Copy link

Hello Ogg,

I try to use the macro 'to_user_exec', but it is not defined in the pb definition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants