++ed by:
TINITA

1 PAUSE user

Mikko Koivunalho
and 1 contributors

NAME

Docker::Names::Random - Create random strings like Docker does for container names.

VERSION

version 0.0.2

SYNOPSIS

    # As an object (if you create many, this is more efficient).
    require Docker::Names::Random;

    my $dnr = Docker::Names::Random->new();
    my $random_name1 = $dnr->docker_name();

    # As an imported function.
    use Docker::Names::Random qw( docker_name );
    # OR
    use Docker::Names::Random qw( :all );

    my $random_name2 = docker_name();

DESCRIPTION

If you are using Docker, you may have noticed that it creates random names for containers when you haven't provided any specific name. These names are a combination of an adjective and a proper name of an individual. The individuals are famous men and women picked from the history of scientific exploration and engineering.

This package allows you to use the same system in your own programs. You would get combinations like interesting_mendeleev, epic_engelbart, lucid_dhawan, recursing_cori, ecstatic_liskov and busy_ardinghelli.

The combination boring_wozniak is not allowed because Steve Wozniak is not boring. This same limitation exists in the original code.

STATUS

This module is currently being developed so changes in the API are possible, though unlikely.

METHODS

new

Create object.

    require Docker::Names::Random;
    my $dnr = Docker::Names::Random->new();

docker_name

Return a random string.

    my $random_name = $dnr->docker_name();

FUNCTIONS

docker_name

Return a random string.

    use Docker::Names::Random qw( docker_name );
    # OR
    use Docker::Names::Random qw( :all );

    my $random_name = docker_name();

AUTHOR

Mikko Johannes Koivunalho <mikko.koivunalho@iki.fi>

COPYRIGHT AND LICENSE

This software is copyright (c) 2020 by Mikko Johannes Koivunalho.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.