At 11:57 PM 7/31/00 -0700, Matthew Cline wrote:
>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.

While a way to taint something could reasonably be part of the main 
distribution (which'd be nice), I think I'd prefer to leave untainting to 
regexes.

What I was thinking of was something along the lines of a lexically scoped 
pragma--"use taint"/"no taint". (We could do this by sticking in an opcode 
to set/unset the tainting status, as well as the warning status, and so on) 
Taint checking is disabled in a no taint block. Whether we still set the 
taint status on a scalar could depend on the -T switch, so data would still 
be tainted in a no taint block.

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to