logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: [PATCH] #22371 Algorimic Complexity Attack on Perl 5.6.1, 5.8.0: msg#00042

Subject: Re: [PATCH] #22371 Algorimic Complexity Attack on Perl 5.6.1, 5.8.0
On Wed, Jun 25, 2003 at 10:53:47AM +0100, Nick Ing-Simmons wrote:
> I dislike environment variables affecting the way programs work.
> Someone is going to use this for a non-debugging reason and then 
> mandate that PERL_HASH_SEED has to be set in every user's .bashrc 
> (or whatever) - the attribute scheme gives more control.

I can't think of a backwards compatible way to use a predictable hash 
attribute.  My first guess doens't work because the hash declaration happens 
at run time.

    use strict;
    $] >= 5.00801 ? eval q{my %hash : predictable_order}
                  : eval q{my %hash};

My next attempt is no good because it limits the scope of the declaration
to the BEGIN block.

    use strict;
    BEGIN {
        $] >= 5.00801 ? eval q{my %hash : predictable_order}
                      : eval q{my %hash};
    }

How is this attribute supposed to be used in any code that wants to run
before 5.8.1?


-- 
Cottleston, Cottleston, Cottleston Pie.
A fly can't bird, but a bird can fly.
Ask me a riddle and I reply:
"Cottleston, Cottleston, Cottleston Pie."




Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>