-
-
13 Aug 2017 01:15:33 UTC
- Distribution: Data-Unique-Name
- Module version: 20170810
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (0)
- Testers (389 / 115 / 70)
- Kwalitee
Bus factor: 1- 82.50% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (2.54KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Carp
- Test::More
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
Name
Data::Unique::Name - Generate a unique but stable name from a string
Synopsis
use Data::Unique::Name; my $u = Data::Unique::Name::new(4); ok $u->generateUniqueName("aaaa") eq "aaaa"; ok $u->generateUniqueName("aaaa") eq "aaaa1"; ok $u->generateUniqueName("aaaa1") eq "aaaa2"; ok $u->generateUniqueName("aaaa2") eq "aaaa3"; ok $u->generateUniqueName("aaaab") eq "aaaa4"; ok $u->generateUniqueName("a a a a b") eq "aaaa5"; ok $u->generateUniqueName("a-a(a)/ab") eq "aaaa6"; ok $u->generateUniqueName("bbbbb") eq "bbbb"; ok $u->generateUniqueName("bbbbbb") eq "bbbb1"; ok $u->generateUniqueName("bbbbbbb") eq "bbbb2";
Description
Constructor
new
Construct a new set of unique names
1 $length Maximum length of generated names # File name to be used on S3
Methods
generateUniqueName
Generate a unique name corresponding to a string
1 $set Set of unique strings 2 $string String
Index
Installation
This module is written in 100% Pure Perl and, thus, it is easy to read, use, modify and install.
Standard Module::Build process for building and installing modules:
perl Build.PL ./Build ./Build test ./Build install
Author
Copyright
Copyright (c) 2016-2017 Philip R Brenan.
This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.
Module Install Instructions
To install Data::Unique::Name, copy and paste the appropriate command in to your terminal.
cpanm Data::Unique::Name
perl -MCPAN -e shell install Data::Unique::Name
For more information on module installation, please visit the detailed CPAN module installation guide.