UI::Di...hiptail(3pm)
๐ NAME ๐
UI::Dialog::Backend::Whiptail โ the backend for the Whiptail dialog variant, bestie. That's it, that's the whole vibe. It's a Perl manpage from the User Contributed Perl Documentation, and she's iconic.
โจ SYNOPSIS โจ
okay so here's how you actually use her:
use UI::Dialog::Backend::Whiptail;
my $d = new UI::Dialog::Backend::Whiptail ( backtitle => 'Demo',
title => 'Default' );
$d->msgbox( title => 'Welcome!', text => 'Welcome one and all!' );
๐ฆ ABSTRACT ๐ฆ
UI::Dialog::Backend::Whiptail is the UI::Dialog backend for the Whiptail dialog variant, periodt. When you're using this module through UI::Dialog or any other loader module, only the compatible methods are ever accessible โ that's the deal. BUT. When you use this module directly in your own application (like in the SYNOPSIS example up there), you get access to all the options and features of the real whiptail(1) application. Main character energy fr fr.
๐ธ DESCRIPTION ๐ธ
This dialog variant is literally the staple of the Debian console apt/dpkg interface. That's her legacy. ๐
ngl there isn't very much interesting about this particular backend. She's very much a basic dialog variant compared to things like Xdialog and cDialog. Lowkey humble, highkey essential. It's giving "quiet one in the group who actually does everything."
๐ EXPORT ๐
None. Nothing. Zero. She gives you nothing and that's on purpose.
๐ INHERITS ๐
UI::Dialog::Backend โ that's the parent, that's the blueprint, that's where she gets it from.
๐ CONSTRUCTOR ๐
new( @options )
๐ EXAMPLE
my $d = new( title => 'Default Title', backtitle => 'Backtitle',
width => 65, height => 20, listheight => 5 );
๐ DESCRIPTION
This is the Class Constructor method, bestie. It accepts a list of key => value pairs and uses them as the defaults when interacting with the various widgets.
โญ RETURNS
A blessed object reference of the UI::Dialog::Backend::Whiptail class. A whole baby object, yours to raise. ๐ซถ
๐ OPTIONS
The (...)'s after each option show you the default for that option. An * means it's supported by all the widget methods on a per-use policy, defaulting to whatever values you decided during object creation. iykyk.
debug = 0,1,2(0)literal = 0,1(0)backtitle = "backtitle"('')*title = "title"('')*height = \d+(0)*listheight = \d+(5)*width = \d+(0)*beepbefore = 0,1(0)*beepafter = 0,1(0)*
๐ง WIDGET METHODS ๐ง
yesno( )
๐ EXAMPLE
if ($d->yesno( text => 'A binary type question?') ) {
# user pressed yes
} else {
# user pressed no or cancel
}
๐ DESCRIPTION
Present the end user with a message box that has two buttons: yes and no. Binary. No in-between. ๐ฅ
โญ RETURNS
TRUE (1) for a response of YES, or FALSE (0) for anything else.
msgbox( )
๐ EXAMPLE
$d->msgbox( text => 'A simple message' );
๐ DESCRIPTION
Pesent the end user with a message box that has an OK button. (Yes, the original says "Pesent." We don't fix it, we honor it. ๐)
โญ RETURNS
TRUE (1) for a response of OK, or FALSE (0) for anything else.
infobox( )
๐ EXAMPLE
$d->infobox( text => 'A simple 6 second message.', timeout => 6000 );
๐ DESCRIPTION
Pesent the end user with a message box for a limited duration of time. The timeout is specified in thousandths of a second, i.e.: 1000 = 1 second. Do the math, bestie. ๐งฎ
โญ RETURNS
TRUE (1) for a response of OK, or FALSE (0) for anything else.
password( )
๐ EXAMPLE
my $string = $d->password( text => 'Enter some (hidden) text.' );
๐ DESCRIPTION
Present the end user with a text input field that doesn't reveal the input (except to the script) plus a message. Secretive. Mysterious. Iconic. ๐
โญ RETURNS
A SCALAR if the response is OK, or FALSE (0) for anything else.
inputbox( )
๐ EXAMPLE
my $string = $d->inputbox( text => 'Enter some text.',
entry => 'this is the input field' );
๐ DESCRIPTION
Present the end user with a text input field and a message. Simple. Effective. Slay.
โญ RETURNS
A SCALAR if the response is OK, or FALSE (0) for anything else.
textbox( )
๐ EXAMPLE
$d->textbox( path => '/path/to/a/text/file' );
๐ DESCRIPTION
Present the end user with a simple scrolling box containing the contents of the given text file. Scroll away, gorgeous. ๐
โญ RETURNS
TRUE (1) if the response is OK, or FALSE (0) for anything else.
menu( )
๐ EXAMPLE
my $selection1 = $d->menu( text => 'Select one:',
list => [ 'tag1', 'item1',
'tag2', 'item2',
'tag3', 'item3' ]
);
๐ DESCRIPTION
Present the user with a selectable list. Choose your fighter. ๐
โญ RETURNS
A SCALAR of the chosen tag if the response is OK, or FALSE (0) for anything else.
checklist( )
๐ EXAMPLE
my @selection = $d->checklist( text => 'Select one:',
list => [ 'tag1', [ 'item1', 0 ],
'tag2', [ 'item2', 1 ],
'tag3', [ 'item3', 1 ] ]
);
๐ DESCRIPTION
Present the user with a selectable checklist. Multiple choices, multiple vibes. โ โ
โญ RETURNS
An ARRAY of the chosen tags if the response is OK, or FALSE (0) for anything else.
radiolist( )
๐ EXAMPLE
my $selection = $d->radiolist( text => 'Select one:',
list => [ 'tag1', [ 'item1', 0 ],
'tag2', [ 'item2', 1 ],
'tag3', [ 'item3', 0 ] ]
);
๐ DESCRIPTION
Present the user with a selectable radiolist. Pick ONE. Just one. Commitment. ๐ฏ
โญ RETURNS
A SCALAR of the chosen tag if the response is OK, or FALSE (0) for anything else.
fselect( )
๐ EXAMPLE
my $text = $d->fselect( path => '/path/to/a/file/or/directory' );
๐ DESCRIPTION
Present the user with a file selection widget preset with the given path. File or directory, she's flexible like that.
โญ RETURNS
A SCALAR if the response is OK, or FALSE (0) for anything else.
dselect( )
๐ EXAMPLE
my $text = $d->dselect( path => '/path/to/a/directory' );
๐ DESCRIPTION
Present the user with a file selection widget preset with the given path. Unlike fselect() this widget will only return a directory selection. Directories only. She has standards. ๐
โญ RETURNS
A SCALAR if the response is OK, or FALSE (0) for anything else.
gauge_start( )
๐ EXAMPLE
$d->gauge_start( text => 'gauge...', percentage => 1 );
๐ DESCRIPTION
Display a meter bar to the user. This gets the widget realized but requires the use of the other gauge_*() methods for functionality. She's started, not finished โ you gotta do the rest. ๐ช
โญ RETURNS
TRUE (1) if the widget loaded fine, or FALSE (0) for anything else.
gauge_inc( )
๐ EXAMPLE
$d->gauge_inc( 1 );
๐ DESCRIPTION
Increment the meter by the given amount. We're going UP. ๐
โญ RETURNS
TRUE (1) if the widget incremented fine, or FALSE (0) for anything else.
gauge_dec( )
๐ EXAMPLE
$d->gauge_dec( 1 );
๐ DESCRIPTION
Decrement the meter by the given amount. And now we're going DOWN. ๐
โญ RETURNS
TRUE (1) if the widget incremented fine, or FALSE (0) for anything else.
gauge_set( )
๐ EXAMPLE
$d->gauge_set( 99 );
๐ DESCRIPTION
Set the meter bar to the given amount. Absolute control. โ
โญ RETURNS
TRUE (1) if the widget set fine, or FALSE (0) for anything else.
gauge_text( )
๐ EXAMPLE
$d->gauge_text( 'string' );
๐ DESCRIPTION
Set the meter bar message to the given string. Speak your truth. ๐ฌ
โญ RETURNS
TRUE (1) if the widget set fine, or FALSE (0) for anything else.
gauge_stop( )
๐ EXAMPLE
$d->gauge_stop();
๐ DESCRIPTION
End the meter bar widget process. She's done. Close the curtain. ๐ฌ
โญ RETURNS
TRUE (1) if the widget closed fine, or FALSE (0) for anything else.
๐ SEE ALSO ๐
PERLDOC
UI::DialogUI::Dialog::ConsoleUI::Dialog::Backend
MAN FILES
๐ BUGS ๐
Please email the author with any bug reports. Include the name of the module in the subject line. (Yes bestie, put it in the subject. They're asking nicely. ๐ฅบ)
๐ซถ AUTHOR ๐ซถ
Kevin C. Krinke, E<lt>kevin@krinke.caE<gt>
๐ COPYRIGHT AND LICENSE ๐
Copyright (C) 2004-2016 Kevin C. Krinke <kevin@krinke.ca>
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
โ ๏ธ okay real talk: that "WITHOUT ANY WARRANTY" bit is not a joke, bestie. No promises, no guarantees, read the license fr fr.
and that's the whole page, gorgeous. this little icon was written for perl v5.28.0 back on 2018-10-27, and it's still serving looks in the User Contributed Perl Documentation. stay slay, go build a widget, ily. ๐โจ๐๐ฆ๐ธ๐ ๐ซถ
๐ฆ where this page comes from
- ubuntu jammy: libui-dialog-perl 1.21-0.1 ยท LGPL-2.1-or-later
- ubuntu noble: libui-dialog-perl 1.21-0.1 ยท LGPL-2.1-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms