On Mon, 31 Jul 2000, Nathan Wiger wrote:
> Instead, it would be really cool if Perl6 let you do this:
>
> #! perl -T
> local($^T) = 0;
> $ENV{PATH} = read_config_file();
> local($^T) = 1;
I would prefer something like:
#! perl -T
$ENV{PATH} = untaint( read_config_file() );
In other words, either make the 'Taint' and 'Untaint' packages part of the
standard distribution, or put them into the core language.
Something else which might be useful for tainting would be something like:
taint_var($foo);
no_taint_var($bar);
With this, any value assigned to $foo would become tainted, and any value
assigned to $bar would become untainted.
Also:
my $fh = new FileHandle("trusted_config_file");
$fh->setTrusted(1);
Then anything read from $fh wouldn't be tainted, rather than having to
untaint every single thing read from $fh.
--
Matthew Cline | Suppose you were an idiot. And suppose that
[EMAIL PROTECTED] | you were a member of Congress. But I repeat
| myself. -- Mark Twain