Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Package for cli application

by prashantpokhriyal (Novice)
on Oct 03, 2017 at 19:43 UTC ( #1200622=perlquestion: print w/replies, xml ) Need Help??
prashantpokhriyal has asked for the wisdom of the Perl Monks concerning the following question:

I want to create a CLI application, which is going to parse user input and then call some third party rest service to get back the result . So is there any package which will make this easy for me?

Replies are listed 'Best First'.
Re: Package for cli application
by choroba (Bishop) on Oct 03, 2017 at 19:59 UTC
    See App::CLI, or more advanced and still evolving App::Spec. You might want to see Term::ReadKey for the low-level stuff.

    ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

      thank you sir. I'll have a look over it

Re: Package for cli application
by stevieb (Abbot) on Oct 03, 2017 at 19:57 UTC

    Getopt::Long to handle the application's parameters and user input, and potentially REST::Client to connect to the remote API.

    Without any further details, it's difficult to help much further than a couple of recommendations. Either way, you're likely going to have to integrate more than just a single package to get everything to hang together (again, depending on complexity).

      I want to use same kind of functionality like nodejs cli application has. Or you can say a REPL based application.
Re: Package for cli application
by jahero (Scribe) on Oct 04, 2017 at 05:43 UTC

    MooX::Commander for easy integration with one of famous OOP frameworks. Beam::Wire to automate repetitive tasks which share the same logic (code) and differ in input parameters. The last one is actualy a favourite of mine.

    Note that you should perceive these as useful alternatives, there is a LOT of modules that could be used.

    EDIT: added links to CPAN (text previously written on tablet)

Re: Package for cli application
by dmitri (Priest) on Oct 04, 2017 at 19:34 UTC
Re: Package for cli application
by gnosti (Hermit) on Oct 05, 2017 at 06:09 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1200622]
Approved by Corion
Front-paged by haukex
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2017-12-18 17:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (494 votes). Check out past polls.

    Notices?