X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlrun.pod;h=81d47495b755946125c2900cd0fd27c8436dd43a;hb=16114dde8ca7b3eded13218a07f79301ce8c5946;hp=043ab5d10645ae24a117fd3b1aa7fcc4692f9ede;hpb=48b971ca150628f9bfd4a49abb4675434cdd71df;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlrun.pod b/pod/perlrun.pod index 043ab5d..81d4749 100644 --- a/pod/perlrun.pod +++ b/pod/perlrun.pod @@ -127,7 +127,7 @@ as the first line in C<*.cmd> file (B<-S> due to a bug in cmd.exe's =item MS-DOS Create a batch file to run your program, and codify it in -C (see the F file in the source +C (see the F file in the source distribution for more information). =item Win95/NT @@ -947,9 +947,23 @@ You perhaps were thinking of C<:crlf:bytes> or C<:perlio:bytes>. =item :crlf -A layer that implements DOS/Windows like CRLF line endings. -On read converts pairs of CR,LF to a single "\n" newline character. -On write converts each "\n" to a CR,LF pair. +A layer that implements DOS/Windows like CRLF line endings. On read +converts pairs of CR,LF to a single "\n" newline character. On write +converts each "\n" to a CR,LF pair. Note that this layer likes to be +one of its kind: it silently ignores attempts to be pushed into the +layer stack more than once. + +(Gory details follow) To be more exact what happens is this: after +pushing itself to the stack, the C<:crlf> layer checks all the layers +below itself to find the first layer that is capable of being a CRLF +layer but is not yet enabled to be a CRLF layer. If it finds such a +layer, it enables the CRLFness of that other deeper layer, and then +pops itself off the stack. If not, fine, use the one we just pushed. + +The end result is that a C<:crlf> means "please enable the first CRLF +layer you can find, and if you can't find one, here would be a good +spot to place a new one." + Based on the C<:perlio> layer. =item :mmap @@ -1111,27 +1125,40 @@ PERL_ENCODING environment variable is consulted for an encoding name. =item PERL_HASH_SEED (Since Perl 5.8.1.) Used to randomise Perl's internal hash function. +To emulate the pre-5.8.1 behaviour, set to an integer (zero means +exactly the same order as 5.8.0). "Pre-5.8.1" means, among other +things, that hash keys will be ordered the same between different runs +of Perl. -The default behaviour is B to randomise if the PERL_HASH_SEED is -unset. If Perl has been compiled with C<-DUSE_HASH_SEED>, the default -behaviour B to randomise. If Perl hash been compiled with -C<-DNO_HASH_SEED>, the hash randomisation is completely disabled. - -If PERL_HASH_SEED is set to a numeric (positive integer) string, -that is used as the seed. +The default behaviour is to randomise unless the PERL_HASH_SEED is set. +If Perl has been compiled with C<-DUSE_HASH_SEED_EXPLICIT>, the default +behaviour is B to randomise unless the PERL_HASH_SEED is set. If PERL_HASH_SEED is unset or set to a non-numeric string, Perl uses the pseudorandom seed supplied by the operating system and libraries. +This means that each different run of Perl will have a different +ordering of the results of keys(), values(), and each(). -The seed being set means that each different run of Perl will have -a different ordering of the results of keys(), values(), and each(). +B. Hashes are +randomized to protect against local and remote attacks against Perl +code. By manually setting a seed this protection may be partially or +completely lost. -See L for more information. +See L and +L for more information. =item PERL_HASH_SEED_DEBUG -(Since Perl 5.8.1.) Set to "1" to display (to STDERR) the value of -the hash seed at the beginning of execution. +(Since Perl 5.8.1.) Set to one to display (to STDERR) the value of +the hash seed at the beginning of execution. This, combined with +L is intended to aid in debugging nondeterministic +behavior caused by hash randomization. + +B: by knowing it one +can craft a denial-of-service attack against Perl code, even remotely, +see L for more information. +B to people who don't need to know it. +See also hash_seed() of L. =item PERL_ROOT (specific to the VMS port)