Install this package:
emerge -a dev-perl/String-Random
If the package is masked, you can unmask it using the autounmask tool or standard emerge options:
autounmask dev-perl/String-Random
Or alternatively:
emerge --autounmask-write -a dev-perl/String-Random
| Version | EAPI | Keywords | Slot |
|---|---|---|---|
| 0.320.0 | 8 | ~amd64 | 0 |
<pkgmetadata>
<maintainer type="person" proxied="yes">
<email>chris.travers@gmail.com</email>
<name>Chris Travers</name>
</maintainer>
<maintainer type="project" proxied="proxy">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
<maintainer type="project">
<email>perl@gentoo.org</email>
</maintainer>
<longdescription lang="en">
This module makes it trivial to generate random strings.
As an example, let's say you are writing a script that needs to generate a random password for a user. The relevant code might look something like this:
use String::Random;
my $pass = String::Random->new;
print "Your password is ", $pass->randpattern("CCcc!ccn"), "\n";
This would output something like this:
Your password is UDwp$tj5
NOTE!!!: currently, String::Random defaults to Perl's built-in predictable random number generator so the passwords generated by it are insecure. See the rand_gen option to String::Random constructor to specify a more secure random number generator. There is no equivalent to this in the procedural interface, you must use the object-oriented interface to get this functionality.
</longdescription>
<upstream>
<remote-id type="cpan">String::Random</remote-id>
<remote-id type="cpan-module">String::Random</remote-id>
</upstream>
</pkgmetadata>
| Type | File | Size | Versions |
|---|
| Type | File | Size |
|---|---|---|
| DIST | String-Random-0.32.tar.gz | 24585 bytes |