Fry-Lib-CDBI-Basic
view release on metacpan or search on metacpan
lib/Fry/Lib/CDBI/Basic.pm view on Meta::CPAN
133134135136137138139140141142143144145146147148149150151152sub
modify_file {
my
(
$cls
,
$tempfile
) =
@_
;
my
$inp
;
system
(
$cls
->Var(
'editor'
) .
" $tempfile"
);
# or die "can't execute command as $<: $@";
#?: why does this system always return a fail code
#$cls->view("cdbi_update (y/n)? "); chomp($inp = <STDIN>);
$inp
=
$cls
->Rline->stdin(
"cdbi_update (y/n)?"
);
return
(
$inp
eq
"y"
);
}
sub
update_from_file {
my
(
$cls
,
$tempfile
,
@records
) =
@_
;
my
@lines
=
$cls
->file2array(
$tempfile
);
#my $firstline = shift(@lines);
#read column order from file
#my @fields = split(/$updatedelim/,$firstline);
#or not
my
@fields
= @{
$cls
->Var(
'action_columns'
)};
( run in 0.930 second using v1.01-cache-2.11-cpan-49f99fa48dc )