GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  UMPH::PROMPT (3)

.ds Aq ’

NAME

Umph::Prompt - Interactive prompt for Umph

CONTENTS

SYNOPSIS



  my @items;
  push @items, {title => foo, url => http://foo, selected => 0};
  push @items, {title => bar, url => http://bar, selected => 0};

  my $p = new Umph::Prompt(

    # Commands.
    commands => {
      q => sub {
        my ($p, $args) = @_;
        $p->exit(\@items, $args);
      },
      d => sub {
        my ($p, $args) = @_;
        $p->display(\@items, $args);
      },
      m => sub {
        my ($p, $args) = @_;
        $p->max_shown_items(@{$args});
      },
      s => sub {
        my ($p, $args) = @_;
        $p->select(\@items, $args);
      },
      h => sub {
        my ($p, $args) = @_;
        $p->help($args);
      },
    },

    # Callbacks. All of these are optional.
    ontoggle => sub {
      my ($p, $args) = @_;
      $p->toggle(\@items, $args);
    },
    onloaded => sub {
      my ($p, $args) = @_;
      $p->display(\@items, $args);
    },
    onitems => sub {return \@items},

    # Other (required) settings
    total_items     => scalar @items,
    prompt_msg      => foo,
    max_shown_items => 20
  );

  $p->exec;



DESCRIPTION

Umph::Prompt is an interactive prompt module for umph and similar programs.

    EXPORT

None by default.

SEE ALSO



  gitweb: <http://repo.or.cz/w/umph-prompt.git>



AUTHOR

Toni Gundogdu <legatvs at sign cpan org<gt>

LICENSE

Umph::Prompt is free software, licensed under the LGPLv2.1+.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 UMPH::PROMPT (3) 2011-09-01

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.