in reply to Net::Appliance::Session, Disable paging & send commands after "su" ?

I've never used the module, but the docs say this:

To see a log of all the processes within this module, and a copy of all data sent to and received from the device, call the following method: $s->set_global_log_at('notice');

I'm guessing that would show what the other end actually sent, then you would have better insight into why it didn't match.

  • Comment on Re: Net::Appliance::Session, Disable paging & send commands after "su" ?

Replies are listed 'Best First'.
Re^2: Net::Appliance::Session, Disable paging & send commands after "su" ?
by kschwab (Vicar) on Nov 18, 2013 at 18:26 UTC
    Just noticed you already have logging at the 'debug' level, so it should show the data...but I don't see it. Perhaps calling the $s->last_reponse() method would show it?
      Hello monks,

      I found the solutions for one of my problems :

      1. disable paging -- just put ....new->({ ..do_paging => 0.. })

      https://rt.cpan.org/Public/Bug/Display.html?id=69139

      2. $s->begin_privileged({password => 'pass'});

      The above suggestion.. Doesn't work for me. Workaround is to put "send pass " in the macro begin_privileged at the Phrasebook file i.e.

      ...... macro begin_privileged send su - match passsu send pass match privileged ......