szabgab has asked for the wisdom of the Perl Monks concerning the following question:
This dies with the famous "Insecure dependency in require while running with -T switch" error.#!/usr/bin/perl -T use strict; use warnings; use FindBin; use lib "$FindBin::Bin/../lib"; use CGI; print CGI->new->header;
The following cleans up the taint but I am just playing with fire here, right? Should I really blindly trust FindBin?
#!/usr/bin/perl -T use strict; use warnings; use FindBin; my $path; BEGIN { if ($FindBin::Bin =~ /(.*)/) { $path = $1; } } use lib "$path/../lib"; use CGI; print CGI->new->header;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: FindBin and taint mode
by merlyn (Sage) on Nov 21, 2006 at 16:33 UTC | |
by szabgab (Priest) on Nov 21, 2006 at 17:56 UTC | |
|
Re: FindBin and taint mode
by ikegami (Patriarch) on Nov 21, 2006 at 18:15 UTC |