in reply to Custom prompts for Net::Appliance::Session

G'day edimusrex,

I've never used any of these modules; however, as your question has been sitting there for over 12 hours without a reply, I thought I'd have a look.

In Net::CLI::Interact::Phrasebook, under the PHRASEBOOK FORMAT section, it has:

"Try to make the Prompt as specific as possible, including line-end anchors."

All the examples show that anchor. Here's the first two match examples:

match /\(config[^)]*\)# ?$/ match /> ?$/

And one further down is very close to your password prompt:

match /[Pp]assword: ?$/

So instead of

match /User Name/ match /Password/

maybe try

match /User Name: ?$/ match /Password: ?$/

You might also want to scrutinise your expected prompts for case and whitespace. For instance, perhaps this would work better for the username prompt:

match /[Uu]ser\s*[Nn]ame:\s*?$/

— Ken

Replies are listed 'Best First'.
Re^2: Custom prompts for Net::Appliance::Session
by edimusrex (Monk) on Sep 15, 2017 at 14:52 UTC

    After implementing those suggested changes I still get the same error as described above

      I've front-paged your post to give it a bit more exposure: perhaps another monk can provide more assistance. I'm unable to help you further with this, myself.

      — Ken

Re^2: Custom prompts for Net::Appliance::Session
by edimusrex (Monk) on Sep 15, 2017 at 14:33 UTC
    Thank you for the reply. I will try that and see if I have any luck.