use Tk;
use strict;
$::cini_global = { trickle => { email_template_file => "nothing" }};
my $mw = MainWindow->new;
$mw->Entry(
-width => 40,
-textvariable => \$::cini_global->{trickle}->{email_template_file}
)->pack(qw/-expand 1 -fill x/);
$mw->Button(
-text => "Change",
-command => sub {
$::cini_global->{trickle}->{email_template_file} =
$mw->getOpenFile();
})->pack;
MainLoop;
####
[trickle]
email_template_file=nothing
##
##
use strict;
use Config::IniHash;
use Data::Dumper;
use Tk;
$::cini_global = ReadINI 'config';
my $ref = $::cini_global->{trickle}->{email_template_file};
my $mw = MainWindow->new;
$mw->Entry(
-width => 40,
-textvariable => \$ref
)->pack(qw/-expand 1 -fill x/);
$mw->Button(
-text => "Change",
-command => sub {
$ref = $mw->getOpenFile();
$::cini_global->{trickle}{email_template_file} = $ref;
})->pack;
MainLoop;