http://www.perlmonks.org?node_id=892563


in reply to Re^3: Printer module from web interface
in thread Printer module from web interface

(server died yesterday, so I'm back on this issue after wasting precious time...*sigh*)

So, I've modified the beginning of the Printer::Unix file in the standard Printer module (which, BTW, I feel so inadequate to modify a CPAN module):

use Env qw(PRINTER LPDEST NPRINTER NGPRINTER PATH); #added the two following lines $ENV{'PATH'}='/usr/local/sbin'; delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'}; ############################################################ sub list_printers { ...
If I understand correctly, this should properly untaint $ENV{'PATH'}, right? I'm still getting the exact same error. Is there something I'm forgetting or missing or just plain ol' not understanding?

I've verified the location permissions. Anything I set it to is non-world writable, but still tanks.

I don't know if it's relevant, but I found this. It appears to be very similar to what I'm experiencing, however, with a different module. Of course the fix given in that post is specific to the MIME::Lite module...not helping here.

Replies are listed 'Best First'.
Re^5: Printer module from web interface
by Anonymous Monk on Mar 11, 2011 at 08:29 UTC
    So, I've modified the beginning of the Printer::Unix file in the standard Printer module (which, BTW, I feel so inadequate to modify a CPAN module):

    Well, you're supposed to modify your program ...... and error messages don't come without line numbers