Here's the kicker, it's not always failing. Even though I'm explicitly setting ENV{PATH} in all 3 files, every 3 or so times the script runs, it somehow resets the ENV{PATH} to the original value. Only when I explicitly reset it right before it fails in Printer::Unix.pm does it get the correct ENV{PATH}.
...And then it will again randomly fail (more like every 6th running instead of every 3rd), with the new error Can't open printer connection to lp -d 6L.$ENV{PATH}='/usr/bin'; warn "path=$ENV{PATH}\n"; open PRINTER, "| $self->{print_command}->{linux}-{command}" or Carp::croak..
ETA: However, if my code is:
(without the redundant 4th reset of ENV{PATH}), sometimes the warning output shows the correct PATH, sometimes, it doesn't.warn "path=$ENV{PATH}\n"; open PRINTER, "| $self->{print_command}->{linux}-{command}" or Carp::croak..
In reply to Re^4: Taint error in Printer module
by ksublondie
in thread Taint error in Printer module
by ksublondie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |