Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: How to give prompt

by 1nickt (Canon)
on Mar 16, 2018 at 12:02 UTC ( [id://1211030]=note: print w/replies, xml ) Need Help??


in reply to How to give prompt

Hi, I don't know anything about your requirement or telnet prompts, but your question seems to be one about basic software design.

You should write a module named something like MyConnect.pm containing the code that is used for all cases. Then you should write subclasses like MyConnect/SomeDevice.pm and MyConnect/OtherDevice.pm which contain the functions that are specific to each case. Then use the appropriate subclass in each case.

See perlmod and many other resources, e.g. https://perlmaven.com/how-to-create-a-perl-module-for-code-reuse.


The way forward always starts with a minimal test.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1211030]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2024-04-18 06:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found