String::Unique - A source of deterministic pseudorandom strings [DPS]. Objects of this class will generate a series of DPS of a set length for a set 2 char 'salt' [similar to UNIX crypt's salt] and resettable string that is assumed to be a date string [although this is not enforced].
Note that if the date string is changed, the object resets itself and begins to generate a new series for the new date string.
Version 1.10
use String::Unique; my $dayrefs = String::Unique->new({characterCount => 11, salt => 'AT',}); my $string = $dayrefs->getStringByIndex(9999); ...
Class constructor new
Requires a hash ref containing a salt, string length and date
Reset the day structure for date.
Return the unique string in the [index] sequence for the given date or today is date is not supplied. This seldom used class method is optimized for memory not speed.
Return [index] for the unique string in the sequence for the given dat. This seldom used class method is optimized for memory not speed.
The primary method of this class. In scalar context returns the next entry in the daily queue of pseudorandom strings, in list context returns the next entry and the day of year as a 3 digit string ie '012' == January 13th.
Private class method; sets up the queue for date $datestring
Private class method; returns the next unique string in date: $datstring-s Queue
Private class method; returns a candidate string
Christian Werner Sr, << <saltbreez@cpan.org> >>
Please report any bugs or feature requests to bug-string-unique at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=String-Unique. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-string-unique at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc String::Unique
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=String-Unique
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/String-Unique
CPAN Ratings
http://cpanratings.perl.org/d/String-Unique
Search CPAN
http://search.cpan.org/dist/String-Unique/
This module was adopted from the module Unique by the same author, developed for Wells Fargo, see license and copyright
Copyright 2007,2008 Wells Fargo, all rights reserved. Copyright 2011 Christian Werner Sr.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install String::Unique, copy and paste the appropriate command in to your terminal.
cpanm
cpanm String::Unique
CPAN shell
perl -MCPAN -e shell install String::Unique
For more information on module installation, please visit the detailed CPAN module installation guide.