File: yn.pm

package info (click to toggle)
libapp-cmd-plugin-prompt-perl 1.006-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 184 kB
  • sloc: perl: 257; makefile: 2
file content (13 lines) | stat: -rw-r--r-- 227 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
use strict;
use warnings;
package TestApp::Command::yn;
use TestApp -command;

sub run {
  my ($self) = @_;

  my $yn = prompt_yn('just pick y or n', { default => 1 });
  printf "you picked: %s\n", ($yn ? 'yes' : 'no');
};

1;