| Server IP : 162.214.74.102 / Your IP : 216.73.217.103 Web Server : Apache System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64 User : lrsys ( 1015) PHP Version : 5.6.40 Disable Function : exec,passthru,shell_exec,system MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/doc/perl-Curses-UI-0.9609/examples/ |
Upload File : |
#!/usr/bin/perl -w
use strict;
use warnings;
use FindBin;
use lib "$FindBin::RealBin/../lib";
use Curses::UI;
use File::Spec;
use File::Temp qw ( :POSIX );
my $debug = 0;
my $fh = tmpfile();
open STDERR, ">&$fh";
if (@ARGV and $ARGV[0] eq '-d') {
$debug = 1;
}
my $cui = new Curses::UI (
-clear_on_exit => 0,
-debug => $debug,
);
my $filename;
foreach my $mod (keys %INC) {
$filename = $INC{$mod} if ($mod =~ /UI\.pm/);
}
$filename =~ s/\.pm//gi;
$filename = File::Spec->catfile($filename, "Language");
opendir DIR, "$filename" or die "Couldn't open language dir $filename: $!\n";
my @entries = grep /\.pm$/, sort readdir(DIR);
map s/\.pm$//, @entries;
$cui->dialog( "This demo will present all languages of Curses::UI to you\n" .
join "\n", @entries);
foreach my $entry (@entries) {
my $lang = new Curses::UI::Language("$entry");
$cui->lang($lang);
$cui->dialog("\u$entry");
$cui->savefilebrowser();
}