| 1 |
NAME |
| 2 |
|
| 3 |
Tickit::Widget::Entry::Plugin::History - add readline-like history to a |
| 4 |
Tickit::Widget::Entry |
| 5 |
|
| 6 |
SYNOPSIS |
| 7 |
|
| 8 |
use Tickit::Widget::Entry; |
| 9 |
use Tickit::Widget::Entry::Plugin::History; |
| 10 |
|
| 11 |
my $entry = Tickit::Widget::Entry->new( ... ); |
| 12 |
Tickit::Widget::Entry::Plugin::History->apply( $entry ); |
| 13 |
|
| 14 |
... |
| 15 |
|
| 16 |
DESCRIPTION |
| 17 |
|
| 18 |
This package applies code to a Tickit::Widget::Entry instance to |
| 19 |
implement a history mechanism, which stores previously-entered values |
| 20 |
allowing them to be recalled and reused later. |
| 21 |
|
| 22 |
METHODS |
| 23 |
|
| 24 |
apply |
| 25 |
|
| 26 |
Tickit::Widget::Entry::Plugin::History->apply( $entry, %opts ) |
| 27 |
|
| 28 |
Applies the plugin code to the given Tickit::Widget::Entry instance. |
| 29 |
|
| 30 |
The following named options are recognised: |
| 31 |
|
| 32 |
storage => ARRAY |
| 33 |
|
| 34 |
An optional reference to an array to store the history in. If absent, |
| 35 |
a new anonymous array will be created. |
| 36 |
|
| 37 |
ignore_duplicates => BOOL |
| 38 |
|
| 39 |
If true, an entry will not be pushed into history if it is equal to |
| 40 |
the most recent item already there. |
| 41 |
|
| 42 |
AUTHOR |
| 43 |
|
| 44 |
Paul Evans <[email protected]> |
| 45 |
|