Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

minimal shell-like interface for CLI app

by wanradt (Scribe)
on Mar 04, 2009 at 14:24 UTC ( #748164=perlquestion: print w/replies, xml ) Need Help??
wanradt has asked for the wisdom of the Perl Monks concerning the following question:

Terr, devoted!

I made little command line dictionary application, but it lacks of some shell-like functions. At least i'd like have history and line editing capabilities. And i'd like to stick to perl standard modules. Is there such tools to make it possible? If not with standard bundle, what should I look for from CPAN?

Nġnda, WK
  • Comment on minimal shell-like interface for CLI app

Replies are listed 'Best First'.
Re: minimal shell-like interface for CLI app
by Fletch (Chancellor) on Mar 04, 2009 at 14:32 UTC

    Term::ReadLine is core and should satisfy your requirements, but see also this blog post (and the follow ups) implementing a repl using Moose.

    Update: Had typo'd my CPAN link there ('l' for 'L').

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

      Except Term::ReadLine is not bundled with perl base, it is what i looking for. I try for now not make too many dependencies (like Moose and namespaces), but this blog made my horizonts more wide. Thank you!

      Nġnda, WK

        Erm I screwed up my cpan link above, but CPAN, permodlib's list, and Module::CoreList all beg to differ:

        $ corelist Term::ReadLine Term::ReadLine was first released with perl 5.002

        The cake is a lie.
        The cake is a lie.
        The cake is a lie.

Re: minimal shell-like interface for CLI app
by zentara (Archbishop) on Mar 04, 2009 at 15:59 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://748164]
Approved by Corion
[stevieb]: it is exceptionally difficult I'm finding to debug a dist that is x-platform, where on each platform you're wrapping a different binary. Trying to co-ordinate a successful test run where tests are extensive is a nightmare, especially when the dist...
[stevieb]:'re testing is a test system itself. 10+ documented issues fixed, another half dozen found while fixing the original ones. I'm getting there...
[stevieb]: Then throw in changes to Windows that throws everything you trusted right out the window.
[shmem]: that's why it is called "Windows"

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2017-03-28 21:57 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (342 votes). Check out past polls.