Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

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
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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://748164]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2014-09-18 05:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (108 votes), past polls