IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 12, 2026, 2:47:49 PM (7 weeks ago)
Author:
eugene
Message:

convert the IPC::Cmd run calls to ps_run to handle inconsistent behavior between IPC:Cmd versions pre- and post-0.40

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/dqueryparse.pl

    r42042 r43052  
    1313use File::Basename;
    1414use File::Copy;
    15 use IPC::Cmd 0.36 qw( can_run run );
     15use IPC::Cmd 0.36 qw( can_run );
    1616use Getopt::Long qw( GetOptions );
    1717use Pod::Usage qw( pod2usage );
     
    2121use PS::IPP::PStamp::RequestFile qw( :standard );
    2222use PS::IPP::PStamp::Job qw( :standard );
    23 use PS::IPP::Config qw( :standard );
     23use PS::IPP::Config qw( :standard ps_run );
    2424use PS::IPP::Metadata::List qw( parse_md_list );
    2525
     
    8888    my $command = "echo $request_file | $fields -x 0 EXTNAME EXTVER QUERY_ID";
    8989    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    90         run(command => $command, verbose => $verbose);
     90        ps_run(command => $command, verbose => $verbose);
    9191   
    9292    $fields_output = join "", @$stdout_buf;
     
    105105    # set verbose to false so that error message about request not found doesn't appear in parse_error.txt
    106106    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    107         run(command => $command, verbose => 0);
     107        ps_run(command => $command, verbose => 0);
    108108    if ($success) {
    109109        # -listreq succeeded duplicate request name
     
    112112        unless ($no_update) {
    113113            my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    114                 run(command => $command, verbose => $verbose);
     114                ps_run(command => $command, verbose => $verbose);
    115115            if (!$success) {
    116116                my_die("$command failed", $PS_EXIT_UNKNOWN_ERROR);
     
    126126    unless ($no_update) {
    127127        ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    128             run(command => $command, verbose => $verbose);
     128            ps_run(command => $command, verbose => $verbose);
    129129        unless ($success) {
    130130            my_die("$command failed", $PS_EXIT_UNKNOWN_ERROR);
     
    151151    my $dqr_command = "$detect_query_read --dbname $imagedb --input $request_file";
    152152    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    153         run(command => $dqr_command, verbose => $verbose);
     153        ps_run(command => $dqr_command, verbose => $verbose);
    154154    unless ($success) {
    155155        # This is a problem, because I'm not sure how we handle a failure to read something.
     
    489489        unless ($no_update) {
    490490            my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    491                 run(command => $command, verbose => $verbose);
     491                ps_run(command => $command, verbose => $verbose);
    492492            if ($success) {
    493493                my $job_id = join "", @$stdout_buf;
     
    513513    unless ($no_update) {
    514514        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    515             run(command => $command, verbose => $verbose);
     515            ps_run(command => $command, verbose => $verbose);
    516516        if ($success) {
    517517            my $job_id = join "", @$stdout_buf;
     
    534534    unless ($no_update) {
    535535        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    536             run(command => $command, verbose => $verbose);
     536            ps_run(command => $command, verbose => $verbose);
    537537        unless ($success) {
    538538        my_die("$command failed",$PS_EXIT_UNKNOWN_ERROR);
     
    564564    if (!$no_update) {
    565565        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    566             run(command => $command, verbose => $verbose);
     566            ps_run(command => $command, verbose => $verbose);
    567567        unless ($success) {
    568568            my_die("$command failed", $PS_EXIT_UNKNOWN_ERROR);
Note: See TracChangeset for help on using the changeset viewer.