Uri Guttman > Stem-0.11 > Stem::Id

Download:
Stem-0.11.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  5
Open  0
View/Report Bugs
Source   Latest Release: Stem-0.12

This module generates unique Id strings for use as names in Stem addresses. Its most common use is by parent Cells which clone themselves and need a unique Target. The parent Cell uses its Cell name and the new Target to register the cloned Cell.

Constructor Attributes for Class Stem::Id

new

The new method constructs a Stem::Id object. It initializes the Id string to a string of 'a's. The string size determines how long this object can go before it has to reuse previously deleted Id strings.

next

The next method returns the next available Id in the object and marks that as in use. It fails if all possible Id's are in use.

delete

The delete method allows this Id to be reused by a call to the next method.

dump

The dump method returns a the list of Ids that are in use. used. It either returns the list of keys or an anonymous array with them depending on the calling context.

syntax highlighting: