develooper Front page | perl.perl5.porters | Postings from September 2003

Re: How to detect hash randomization?

Thread Previous | Thread Next
From:
Elizabeth Mattijsen
Date:
September 8, 2003 03:47
Subject:
Re: How to detect hash randomization?
Message ID:
p05111b05bb82076ec9c5@[192.168.56.4]
At 12:04 +0200 9/8/03, Paul Johnson wrote:
>slaven@rezic.de said:
>>  Elizabeth Mattijsen <liz@dijkmat.nl> wrote:
>>>  # Get the -Accflags= settings using this Perl executor
>>>
>>>       open my $handle, "$^X -V:ccflags |"
>>>        or die "Could not execute $^X -V:ccflags: $!\n";
>>>       my $ccflags = <$handle>;
>>>       close $handle;
>>
>>  Maybe better use:
>>
>>  require IO::Pipe;
>>  my $pipe = IO::Pipe->new->reader($^X, "-V:ccflags");
>>  my $ccflags = <$pipe>;
>>  $pipe->close;
>
>Or possibly just:
>
>use Config;
>my $ccflags = $Config{ccflags};

Ah, ok, I see where my misunderstanding comes from.  First I had 
built and installed 21021 without any special settings.  Then I built 
with -DNO_HASH_SEED but _didn't_ install.  I just ran ./perl -V in 
the source directory and did not see any mention of -DNO_HASH_SEED.

Now I realize that this was probably caused by the fact that somehow 
either the installed Config.pm or libperl was queried.  Not sure 
whether this is a bug or a feature  ;-(

However, Config.pm is rather heavy, so I'd like to prevent that being loaded.


Liz

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About