I have a Perl script wrapper.pl
with a piece of code that looks like this:
if (-e "$run_dir/fd3d/VrtMsgBus.txt") {
print "VRTMSGBUS: non scalablity mode VrtMsgBus.txt exists\n";
$conf->{'script_list'}{'vrt_scalability'} = {
'cmd' => "perl $script_dir/hevc_enc/pak_rtl/vrt_scalability.pl $run_dir $hevc_fd3d_dir $script_dir",
'dumpdir' => $dumpdir,
'units' => [qw(hwm hle vne hvd hsse hit hpo hfq hft hpr hrs hlc hmc hpp hed vnc htq hsao hmx hlf)],
'requires' => [qw(vrtmsgbus mv_vrtmsgbus mv_vrtmsgbus_org mv_vrtmsgbus_no_scalability)],
};
}
else {
print "VRTMSGBUS: scalablity mode, VrtMsgBus.txt doesnt exist\n";
$conf->{'script_list'}{'vrt_scalability_2'} = {
'cmd' => "perl $script_dir/hevc_enc/pak_rtl/vrt_scalability.pl $run_dir $hevc_fd3d_dir $script_dir",
'dumpdir' => $dumpdir,
'units' => [qw(hwm hle vne hvd hsse hit hpo hfq hft hpr hrs hlc hmc hpp hed vnc htq hsao hmx hlf)],
};
}
I'm trying to execute a particular script vrt_scalability.pl
for different conditions in the manner shown in the code. vrt_scalability.p
' is a separate script that works from the command line, but when I try to execute it using this wrapper.pl
it fails. How do I debug this kind of code?
Also, the commands called in the cmd
part of this code are all working when I run them independent of wrapper.pl
. What could I be doing wrong?
Executing the scripts here:
sub ExecScripts {
foreach my $exec_script_name (keys %{$conf->{'exec_list'}})
{
$conf->{'exec_list'}{$exec_script_name}{'script_was_executed'} = 0;
}
foreach my $exec_script_name (keys %{$conf->{'exec_list'}})
{
my $dependency_script = $conf->{'exec_list'}{$exec_script_name};
if (exists $dependency_script->{'requires'})
{
foreach my $parent_script (@{$dependency_script->{'requires'}})
{
ExecDependencyScripts($conf, $parent_script);
}
}