develooper Front page | perl.perl5.porters | Postings from May 2012

[perl #46019] Documentation for 'srand' has a problem in code snippet

Thread Next
From:
James E Keenan via RT
Date:
May 3, 2012 19:03
Subject:
[perl #46019] Documentation for 'srand' has a problem in code snippet
Message ID:
rt-3.6.HEAD-4610-1336097028-786.46019-15-0@perl.org
On Tue Oct 02 21:33:49 2007, ben@linuxgazette.net wrote:
> 
> This is a bug report for perl from ben@linuxgazette.net,
> generated with the help of perlbug 1.35 running under perl v5.8.7.
> 
> 
> -----------------------------------------------------------------
> [Please enter your report here]
> 
> 
> "perldoc -f srand" (and consequently, perlfunc.pod) contains the
>    following:
> 
> ``
>   Note that you need something much more random than the default
>   seed for cryptographic purposes. Checksumming the compressed
>   output of one or more rapidly changing operating system status
>   programs is the usual method. For example:
> 
>       srand (time ^ $$ ^ unpack "%L*", `ps axww | gzip`);
> ''
> 
> The problem is that 'ps axww | gzip' returns the same output every
>    time, at
> least on my system:
> 
> ``
> ben@Tyr:~$ ps axww|gzip
> gzip: compressed data not written to a terminal. Use -f to force
>    compression.
> For help, type: gzip -h
> ''
> 
> The solution suggested in the error message (i.e., 'ps axww | gzip
>    -f')
> works fine.
> 
> 

In blead, it appears that pod/perlfunc.pod's section on srand() has been
substantially rewritten, such that neither the language which the OP was
criticizing nor what replaced it can be found.

Is there any reason to keep this ticket open?

Thank you very much.
Jim Keenan

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=46019

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