Stephen R. Scaffidi

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

  • Attribute - size

    Description: This sets the number of characters in the Id. It defaults to 6.
    It defaults to: 6


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.


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.


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


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.