http://www.perlmonks.org?node_id=748164

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 (Bishop) 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