Perl Monk, Perl Meditation | |
PerlMonks |
expect module behaviorby jimtron (Initiate) |
on Mar 11, 2019 at 08:34 UTC ( [id://1231111]=perlquestion: print w/replies, xml ) | Need Help?? |
jimtron has asked for the wisdom of the Perl Monks concerning the following question: Hello monks, SO... I have this login for an API. I thought I'd use the expect module, and it seems to work from STDOUT, but the real successful login generates a yaml file that is placed in my home dir. I think this is just my spacing this interaction, but since the file is deposited as part of another process, and I'm guessing as a sub shell in the module, the file never gets created. Thus I'm not logged in - thus, no love. Or I'm forgetting something entirely. Is there a way to force the behavior to be executed as part of my user/environs directly? I'm probably overthinking this quite a bit, but figured if anyone might know a simple trick it would be you all. I have tried forcing the ~/file.yml to be created as part of the process, but no love there either, the process won't read it first before asking for an authentication if the server bit isn't set properly - or something, i'm speculating. All this stems from laziness and wanting to use direnv to automate behavior when I enter a directory, really. Here's the code:
any help or kick in the pants would be appreciated...
Back to
Seekers of Perl Wisdom
|
|