Liz::CategorySet - CategorySet module
use Liz::CategorySet;
$category = new Liz::CategorySet;
#!/usr/local/bin/perl
use Liz::CategorySet;
The Liz::CategorySet package allows for very simple storage of sets of categories of many kinds. After the categories are stored in the database, it is possible to link ID's (any numerical value, but usually an ID that is generated by the NextID method of the Liz::SQL module) with one or more categories. When that is done, it is possible to select ID's according to one or more categories (AND or OR).
The Liz::CategorySet module itself works best when incorporated into a client module because it moves the responsibility of aquiring a connection to a database to the client module and it allows any customisation to take place transparently to the developer.
Take for example the CategorySet method of HN.pm module:
sub CategorySet {
# Obtain the parameters # Start the category using the $hn handle as the database handle # Return the finished object
my( $hn,$token ) = @_; my( $categoryset ) = Liz::CategorySet->new( $token,$hn ); $categoryset; }
Because of the above code in HN.pm, it is now possible to write the following code:
$hn = new HN; $categoryset = $hn->CategorySet( 'technology' );
Note that the database connection of the category is hidden in the creation
of the $hn object.
The following methods can be called without an object specification, but as a class method such as Liz::CategorySet->method().
Return list of category identification names of all categorysets in the database specified. Usually not called by itself, but rather incorporated inside a Client Module.
1 wildcard specification to match (default: all) 2 Liz::SQL compatible handle or reference to routine that performs connect (default: &Connect from caller's namespace)
1 reference to list of identification names in the current database 2 reference to hash with full names 3 reference to hash with database versions
$hn = new HN;
($id,$name) = $hn->CategorySets;
$categorysets = @{$id};
print "All $categorysets categorysets in Hospitality Net:\n";
foreach( @{$id} ) {
print " CategorySet '$$name{$_}' ($_)\n";
}
In HN.pm:
sub CategorySets { Liz::CategorySet->categorysets( $_[1],$_[0] ) }
Create a new Liz::CategorySet object. Creates connection or re-establishes connection with the MySQL database. Usually not called by itself, but rather incorporated inside a Client Module.
1 identification name of category set (default: default category set for database) 2 Liz::SQL compatible handle or reference to routine that performs connect (default: &Connect from caller's namespace)
1 instantiated object 2 flag: whether categoryset was just created
$hn = new HN; $category = $hn->CategorySet( 'technology' );
In HN.pm:
sub CategorySet { Liz::CategorySet->new( $_[1],$_[0] ) }
Delete all tables of the CategorySet object. Please use this with caution, as it will destroy any information that is stored for this CategorySet. If called in a void context, no tables exist for this CategorySet anymore, and any references in the NextID table are also removed. Otherwise, the tables will be re-created automatically and a new object will be returned, just as if the new method was called.
1 newly created CategorySet object, current object will not work anymore
$categoryset->reset;
$categoryset = $categoryset->reset;
The following methods allow changes to information that is associated with an entire categoryset.
Delete one or more categories from the Liz::CategorySet database without first having to create an object for each category to be deleted.
1..N category ID's to be deleted
$hn = new HN; $category = $hn->CategorySet( 'technology' ); $category->delete( 3000320,3000321 );
Set ID fields in the specified object from the field names specified. Adds ``ID'' to each field name for the field to be set with the ID value.
This quickly translates any names in the object to their ID's simply by specifying the field names. It is assumed that there is a field with the name 'PARENT' followed by the name if the ID field, that contains the parent ID of the category to which the name belongs. Top level categoris are assumed if this field does not exist.
Use method FillNamesInObject to translate name values to ID's.
1 object in which to set fields 2..N names of fields to convert from name to ID
# sets fields CITYID, STATEID and COUNTRYID from CITY, STATE and COUNTRY $categoryset->FillIDsInObject( $self,qw(CITY STATE COUNTRY) );
Set name fields in the specified object from the field names specified. Adds ``ID'' to each field name for the field to be read for the ID value.
This quickly translates any ID's in the object to their names simply by specifying the field names. Use method FillIDsInObject to translate field values to ID's.
1 object in which to set fields 2..N names of fields to convert from ID to name
# sets fields CITY, STATE and COUNTRY from CITYID, STATEID and COUNTRYID $categoryset->FillNamesInObject( $self,qw(CITY STATE COUNTRY) );
Return the names of one or more categories specified by ID as a reference to a hash which is keyed to the ID's.
1..N ID's of categories to search for
1 reference to hash of names keyed to the ID's
$names = $hn->IDs2NameHash( @ID );
foreach( keys %{$names} ) {
print "$_: $$names{$_}\n";
}
Return the names of one or more categories specified by ID as a list. If the name of the category is not found, a '' will be made available as the name.
1..N ID's of which to obtain the names
1..N associated names
foreach( $hn->IDs2Names( @ID ) ) {
print "$_\n";
}
Specify or return the current name of the categoryset object. The name can be anything to further identify the goal of the categoryset.
1 new name of categoryset (default: no change)
1 current/old name of categoryset
$xxlink = new xxLINK; $categoryset = $xxlink->CategorySet( 'eurest' ); $categoryset->Name( 'Eurestjes' );
Return the ID's of one or more categories specified by name as a reference to a hash which is keyed to the names. If the name of the category is not found, a '0' will be made available as the ID.
Use method NameAlways2ID to always obtain a valid ID for a category name by inserting a new category if it doesn't exist yet.
1 parent ID to which the categories should belong
(default: top list categories = 0)
2..N names of categories to search for
1 reference to hash of ID's keyed to the names
$IDs = $hn->Names2IDHash( @name );
foreach( keys %{$IDs} ) {
print "$_: $$IDs{$_}\n";
}
Return an ID for a given category name, even if the category does not exist yet. In the latter case, insert a new category with the given parameters.
1 name of the category of which to obtain an ID 2 parent ID or name to which the category should belong (default: top list categories = 0) 3 status to be assigned to category if new (default: 0) 4 options to be assigned to category if new (default: none)
1 ID of category (0 if error, such as no name specified)
$ID = $hn->NameAlways2ID( 'Apenootjes' );
Set one or more fields in an object for a given parentID and a list of names. The names of the fields are created from the name by making the name uppercase and inserting 'PARENT' in front of it. Shortcut to NameAlways2ID. Usually used in the initialization part of a module.
1 object in which to set the fields 2 parentID to be used 3..N names for which to find an ID
$categoryset->NameAlways2ParentIDFields( $self,$parentID, 'categoryID','editionID,'mediumID' );
Return the ID's of one or more categories specified by name as a list. If the name of the category is not found, a '0' will be made available as the ID.
Use method NameAlways2ID to always obtain a valid ID for a category name by inserting a new category if it doesn't exist yet.
1 parent ID to which the categories should belong
(default: top list categories = 0, -1 = any parent ID)
2..N names of categories to search for
1..N associated ID's
foreach( $hn->Names2IDs( 0,@name ) {
print "$_\n";
}
Return the distinct parent IDs of a one or more category ID's. Can of course also be used to obtain the parentID of a single category ID.
1..N ID's of the categories of which to obtain the ParentIDs
1..N ID's of the different parent categories found
The following methods all apply to associating ID's with one or more categories.
Associate a list of ID's with a Category. This is the basically the same action as IDSetCategoryList but based on the name or ID of a category, rather than on an (external) ID.
1 ID or name of category to associate ID's with 2..N ID's to associate with the category
$categoryset->CategorSetIDs( $editID,@wekenID );
Returns all ID's that are associated with one or more categories.
1 flag: whether OR (0) or AND (-1) or number of matches (>0)
(default: OR)
2 name of table for which to return ID's only (optional)
(default: all possible ID's)
3..N ID's of categories for which to search
1..N ID's that are associated with the indicated categories
@ID = $categoryset->Categories2IDs( 0,@selected );
Returns all ID's with categories associated if no category ID's are specified.
Add one or more categories to the current list of categories associated with an ID. This will keep any categories that are listed with the ID and add new ones if they don't appear in the list of associated categories yet.
Use method IDSetCategoryList to replace the list of associated categories by another one.
1 ID to add the list of categories to 2..N ID's of categories to associate also with the ID
$hn->IDAddCategoryList( $vendorID,@extra );
Delete one or more categories from the current list of categories associated with an ID. This will keep any other categories that are listed with the ID.
Use method IDSetCategoryList to replace the list of associated categories by another one.
1 ID to delete the list of categories from 2..N ID's of categories to disassociate with the ID
$hn->IDDeleteCategoryList( $vendorID,@nomore );
Delete one or more categories from the current set. This will all categories supplied from all IDs in the set.
1..N ID's of categories to disassociate from all IDs
$hn->DeleteCategoryFromSet( @nomore );
Return ID's or references to the ID's associated with the given ID and one or more parent ID's. Particularly useful when obtaining a list of values from the categoryLIST associated with a single ID in a CheckBox, RadioButton or Pulldown situation.
This method assumes that there may be more than one category ID associated with any given combination of ID and parent ID. To handle cases where only one category ID can be returned per parent ID, make sure you specify ``1'' as the second input parameter.
1 ID to obtain the list of categories from
2 flag: (default: only return first ID)
0 only return first ID
1 return references to lists of ID's
2 only return first name
3 return references to lists of names
3..N parentIDs or names of the parent categories associated with the ID
1..N (references to) ID's of categories associated with ID and given parentID
(default: set variables in caller's namespace if names specified)
($cpuID,$videoID,$memoryID) = $xxlink->IDCategoryLists2IDs( $ID,0,$ccID,$vcID,$mcID );
$xxlink->IDCategoryLists2IDs( $ID,0,qw(cpu video memory) ); # same as above
($harddiskID,$accessoryID) =
$xxlink->IDCategoryLists2IDs( $ID,1,$hcID,$xcID );
($harddiskID1,$harddiskID2) = @{$harddiskID};
@accessoryID = @{$accessoryID);
$xxlink->IDCategoryLists2IDs( $ID,1,qw(harddisk accessory) ); # almost same
Return timestamps of when the Category List of the specified ID was last updated.
1 ID to obtain the timestamps from
1 last updated timestamp 2 created timestamp
FrozenContents( $updated,$emotion->IDCategoryListUpdated( $ID ) );
Return the list of ID's associated with the given ID. Optionally limit the categories only to those belonging to a given parent. Use method IDSetCategoryList to set the list of associated categories.
1 ID to obtain the list of categories from
2 parentID of the categories to be returned only
(default: return all categories)
1..N ID's of categories associated with the ID
foreach( $hn->IDGetCategoryList( $vendorID ) ) {
print "ID=$ID\n";
}
Replace the current list of categories associated with an ID with the list of categories specified. Can also be used to remove all categories.
Use method IDGetCategoryList to obtain the list of ID's associated with an ID.
1 ID to set list of categories of
2..N ID's of categories to associate with the ID
(default: remove all categories associated with this ID)
$hn->IDSetCategoryList( $vendorID ); $hn->IDSetCategoryList( $vendorID,@categories );
Return a reference to a hash keyed to all the different categories found associated with a list of external ID's. The values in the hash are the frequences with which the categoryID's occur.
1..N external ID's of which to calculate the frequency
1 reference to a hash containing the frequencies keyed to categoryID's 2 total number of categoryID's found
$freq = $categoryset->IDs2FrequencyHash( @externalID );
foreach (keys %{$freq}) {
print "$_: $$freq{$_} times\n";
}
The following methods create HTML of Liz::Perl's pseudo HTML from information in a categoryset.
Return the HTML for check boxes of a specific category specified by ID or name of a main category (with parent 0).
1 ID or name of the category of which to return a checkbox sequence (default: the last used parent ID) 2 name of list (in the caller's namespace to match) 3 extra HTML to be added between CHECK boxes (default: none) 4 flag: return pseudo HTML in <CHECK...> form (default: real HTML) 5 extra condition to be used (default: none)
1 HTML of complete checkbox sequence
<FORM> <PRINT "$categoryset->ID2Check( 'Zappoflips','zappoflip' )"> <PRINT "$categoryset->ID2Check( $categoryID,'category' )"> </FORM>
Return the HTML for a pulldown menu of a specific category specified by ID or name of a main category (with parent 0).
1 ID or name of the category of which to return a pulldown menu (default: the last used parent ID) 2 name of variable in the caller's namespace to match 3 extra HTML to be added at the beginning (default: none) 4 flag: return pseudo HTML in <PULLDOWN...> form (default: real HTML) 5 flag: extra fields (0=empty field, 1=no empty field, ref(@list)=extra fields) (default: add empty field at beginning) 6 extra condition to be used (default: none)
1 HTML of complete pulldown menu
<FORM> <PRINT "$categoryset->ID2Pulldown( 'Zippoflaps','zippoflaps' )"> <PRINT "$categoryset->ID2Pulldown( $categoryID,'category' )"> </FORM>
Return the HTML for radio buttons of a specific category specified by ID or name of a main category (with parent 0).
1 ID or name of the category of which to return a radio button sequence (default: the previously used parent ID for this object) 2 name of variable in the caller's namespace to match 3 extra HTML to be added between RADIO buttons (default: none) 4 flag: return pseudo HTML in <RADIO...> form (default: real HTML) 5 extra condition to be used (default: none)
1 HTML of complete radio button sequence
<FORM> <PRINT "$categoryset->ID2Radio( 'Zippoflaps','zippoflaps' )"> <PRINT "$categoryset->ID2Radio( $categoryID,'category' )"> </FORM>
The following methods allow the addition of alternate (languages) with a CategorySet.
Please note that the usefulness of Alternates has decreased significantly with the invention of sub-classes CategorySets with extra fields. It is therefore likely that the Alternates functionality will be removed in the future, and it should therefore not be used for new projects anymore.
Add an alternative version of all current categories to the CategorySet. This is usually another language version of the names of all categories. This allows the same database structure to be used for each alternate (language) version of a database.
A CategorySet object can only handle one alternate version at the same time. If more than one alternate version of a category is needed, then a separate CategorySet object must be created for each alternate (language) version.
After the alternate (language) is added, the alternate (language) of the CategorySet object is also set to that alternate. To select an already existing alternate, use the SetAlternate method.
1 token for the alternate (language) (a unique string indicating the alternate, e.g. "deutsch") 2 reference to a hash indicating names of categories (keyed on ID) (default: use same names as default) 3 reference to a hash indicating sortnames of categories (keyed on ID) (default: use names as lowercase as default)
1 object itself if successful
Please note that all categories will exist in all alternates (languages). This means that adding or deleting a category in one alternate (language) this will add or delete a category with the same ID in all the other alternates (languages).
$hn = new HN; $categoryset = $hn->CategorySet( 'technology' ); $categoryset->AddAlternate( 'deutsch' );
Set the alternate (language) to be used for the object, and all objects that are created from this object. To create an alternate (language), use the AddAlternate method.
1 token for the alternate (language) (a unique string indicating the alternate, e.g. "deutsch")
1 object itself if successful
$hn = new HN; $categoryset = $hn->CategorySet( 'technology' ); $categoryset->SetAlternate( 'deutsch' );
The following methods allow changes to a single category in a CategorySet.
Create a new Liz::CategorySet::Category object, either from existing information or for a new entry. For more documentation, see the Liz::CategorySet::Category object itself.
1 ID/name to created Category object with (default: none = new category) 2 ID of parent category (default: 0 = top) 3 sortname of category (name of which category should be sorted) (default: same as name if 1st parameter is name)
1 instantiated Category object
$hn = new HN; $categoryset = $hn->CategorySet( 'technology' );
$category = $categoryset->Category; $category = $categoryset->Category( 'Toilet Seats' ); $category = $categoryset->Category( $categoryID );
The following methods are related to finding out (external) ID's that have one or more categories in common.
#----------------------------------------------------------
Returns a reference to a list of ID's that are similar to the specified category ID's and optionally return a reference to a hash containing the number of categories that matched.
1 table of which to return ID's only or ID to be skipped (table implicit from ID)
(default: return all types of ID's)
2 maximum number of ID's to be returned
(default: unlimited)
3 minimal number of matching categories (optional)
(default: 1)
4..N ID's of categories for which to find similar ID's
1 reference to list of ID's that are similar 2 reference to hash with the number of categories matched, keyed to ID
($similarID,$depth) =
$emotion->Categories2SimilarIDs( Libris::Opus::RawTableName(),10,@selected );
foreach( @{$similarID} ) {
print "opusID = $_ ($$depth{$_})\n";
}
To prevent favouring certain ID's that are in the lowest bracket of number of matching ID's, this method will return all ID's found that have the lowest number of categories matched. This means that the maximum number of ID's returned may actually be exceeded.
Clears the cache kept for requests to Categories2SimilarIDs and ID2SimilarIDs.
Pre-generate all possible permutations of categories of all external ID's so that searches with Categories2SimilarIDs and ID2SimilarIDs that have not been cached already, become much faster.
This method is usually run as a daily cron-job. To make sure it is only run when changes have been made, the last edit information of the associated categories is checked against the last time an Explode was done. If no changes were made, this method will return without doing anything.
If a new pre-generated set of permutations is made, then method Categories2SimilarIDsCacheClear is also called immediately to invalidate the cache.
Call method Implode to remove the extra tables and revert to the ``normal'' way of looking for ID's with similar categories.
1 flag: whether to force a complete re-explode (default: check last edited date)
1 whether a full explode was done
print "Explosion performed\n" if $categoryset->Explode;
Returns a flag to indicate whether the methods ID2SimilarIDs and Categories2SimilarIDs use the Exploded table with pre-generated combinations or not.
1 flag: whether the Exploded table will be used
$exploded = $categoryset->Exploded;
Returns a reference to a list of ID's that are similar to the specified ID and optionally return a reference to a hash containing the number of categories that matched.
1 ID for which to search similar ID's (default: ID of object) 2 maximum number of ID's to be returned (default: unlimited) 3 minimal number/fraction/percentage of matching categories (default: 1, N or 0.nnn or nn%) 4 parentID of the category ID's to be used in searching only (default: all category ID's)
1 reference to list of ID's that are similar 2 reference to hash with the number of categories matched, keyed to ID 3 string of ID's and levels, seperated by :, joined by comma's (for caching purposes)
$similarID = $emotion->ID2SimilarIDs( $ID,10 );
To prevent favouring certain ID's that are in the lowest bracket of number of matching ID's, this method will return all ID's found that have the lowest number of categories matched. This means that the maximum number of ID's returned may actually be exceeded.
Remove all pre-generated permutations generated by Explode.
$categoryset->Implode;
The following methods allow listing of information in the CategorySet.
Return an SQL statement handle for a list of categories. This list can be either from the top or of all categories immediately belonging to another category.
The following fields may be specified with the 2nd parameter:
ID The ID of the category
name The name of the category
depth The relative "depth" (number of parents) of the category
sortname The name with which this category is sorted
created Timestamp value when this category was created
updated Timestamp when the category was last updated
options Options associated with the category
parentID The ID of the parent of this category
status The status of this category
foreignkey The foreign key of this category
data The extra data of this category
1 ordinal number or ID of category from which to commence listing (default: 0 = list only at the top) 2 fields to return (comma delimited) (default: 'ID,name,depth,sortname,created,updated,options,parentID,status,foreignkey,data' ) 3 fieldname on which to order the result (default: 'sortname') 4 extra condition to be applied (default: none)
1 SQL statement handle (on which method "fetchrow" can be applied)
Elizabeth Mattijsen ( lizperl@INC.nl )
Contributions by:
- Ronald Lens ( ronald@xxLINK.nl )
(C) 1998-1999 International Network Consultants
Fixed problem in new which would cause fields in subclassed versions to be ignored: the call to ExtraFields was missing.
Put module name between quotes to fix obscure bug in Perl 5.005x under ModPerl in method CategorySet.
Fixed problem in NameAlways2ParentIDFields: ``ID'' was being added to the field name when it shouldn't have been.
Now no longer adds Exporter to ISA: wasn't necessary.
Method IDs2FrequencyHash added: calculate the frequencies in which categoryID's are linked to external ID's.
Methods ID2Check, ID2Pulldown and ID2Radio now accept fully qualified variable names so that they can be called within sub-modules.
Method new now uses Liz::SQL ``new'' to create object.
Class method categorysets now sub-classed from Liz::SQL ``sets''.
Adapted method Categories2SimilarIDs (and indirectly ID2SimilarIDs to use the new Exploded tables when available.
Added new method Exploded to indicate whether the methods ID2SimilarIDs and Categories2IDs use the pre-generated combination tables created by Explode.
Added new method Implode, which removes the extra tables generated by Explode.
Added new method Explode which pre-generates all possible permutations of the categories associated with external ID's, so that ID2SimilarIDs and Categories2SimilarIDs can perform faster searches.
Changed method Names2IDs so that it is now also possible to specify -1 for the parentID, indicating any parent ID for the given name(s).
Fixed problem with NameAlways2ParentIDFields which would not append 'ID' to the field names.
Fixed problem with new which would always return as if the table was just created.
Internal routine CreateTable now also returns whether the table was already existed.
Made all the regular expressions m## and s### constant when possible, thus reducing CPU while increasing the memory footprint somewhat.
Added method NameAlways2ParentIDFields for quickly setting a lot of parent ID's in an object.
Changed method new so that the new Liz::SQL create method is used. This should reduce memory footprint and increase execution speed.
Removed check for InitID: this is not neccesary, as the Liz::SQL connect method already takes care of this.
Added own method reset which now properly drops all necessary tables and takes care of all other references in standard tables.
Changed usage of method ``Exists'' to method ``Count'' in method new which should be much faster in determining whether a table exists or not.
Expanded the meaning of the third input parameter of ID2SimilarIDs to include fractional setting (e.g. 2/3) or percentage setting (e.g. 50%).
Added check to Categories2SimilarIDs so that incorrect number of categories to match (e.g. <0) are caught.
Adapted typography of the source to the new indented format.
Method new now returns a flag to indicate whether the categoryset was just created, to facilitate subclassing with extra fields.
Added support for data (blob): database upgrade was necessary.
Added support for foreign keys: database upgrade was necessary.
Improved method ParentID: now returns the different parentID's of a number of category ID's.
Adapted method Categories2IDs so that an empty list of category ID's would no longer create an error, but instead return all ID's that have at least one category associated, possibly of a specific table.
New method ParentID added: return the parentID of a given category ID.
Method categorysets now also returns a reference to a hash with the database versions.
Fixed problem in categorysets that would prevent categorysets with the default identification from being listed.
Fixed problem in method new that would cause an update to the database format to be performed when a new table was created.
Method new now does automatic upgrades of tables when needed.
New method Categories2SimilarIDs added: find ID's that match more or less a set of category ID's.
New method Categories2SimilarIDsClearCache added: this is in fact the old ID2SimilarIDsClearCache, which is now removed. The old caching table will automatically be removed when the database is updated.
Method ID2SimilarIDs is now a frontend to Categories2SimilarIDs instead of a subroutine by itself.
Support for internal subroutine RawTableName added.
Support for caching ID2SimilarIDs requests added: a query will now first look in a seperate table for cached requests so that the entire database does not need to be searched over and over again.
New method ID2SimilarIDsCacheClear added: clears the cache of queries from ID2SimilarIDs.
Method ID2SimilarIDs now returns all ID's that have the lowest number of categories matching. This prevents favouring specific ID's with the lowest number of categories matched.
Method ID2SimilarIDs now only returns ID's of the same table of the original ID (which makes a lot more sense).
Method Categories2IDs now also allows the specification of the table to limit returned ID's to.
New method IDCategoryListUpdated added: returns timestamps of when the category list of the specified ID was created or updated.
New method ID2SimilarIDs: returns a reference to list of ID's that share a number of categoryID's.
Updated Names2IDs so that it returns the first name of the list of names in a scalar context (instead of the nonsensical number of elements passed to it).
Updated method IDCategoryLists2IDs so that it is also possible to return/set names instead of ID's.
New method CategorySetIDs added: set all the (external) ID's associated with a Category.
Fixed problem in IDDeleteCategoryList.
Methods List, ID2Check, ID2Pulldown and ID2Radio now allow an extra SQL condition to be specified, instead of just a status value.
Method IDCategoryLists2IDs now sets variables and lists in the callers namespaces if called with parent category names in a void context.
Fixed several problems with regards to the new Alternates functionality.
Added parameter to indicate which field to order the result on to method List.
Fixed problem in NameAlways2ID: the depth field was not being set if the category was not yet in the database.
Support for alternates (languages) added. This initially consists of the new methods AddAlternate and SetAlternate plus changes to several other routines.
Added extra HTML field to ID2Pulldown.
Reduced memory footprint by fully qualifying global variables and external subroutines.
New method IDs2Names allows easy translation of a list of ID's to their associated names.
New autoloaded method Token returns the token with which a categoryset was created.
New method FillIDsInObject: allows easy translation of name fields stored in an object to be translated to their ID's and then stored in the object again.
New method FillNamesInObject: allows easy translation of ID fields stored in an object to be translated to their names and then stored in the object again.
Method NameAlways2ID now allows name of the parent category to be specified, instead of ID only.
Methods Names2IDHash and Names2IDs now cache any category name to parentID translation in the object itself.
Method IDCategoryLists2IDs now allows names of the parent categories to be specified, instead of their ID's only.
Methods ID2Check, ID2Pulldown and ID2Radio now allow the name of a main category (with parent 0) to be specified. Parent ID now also defaults to previously used parent ID for the object.
New method NameAlways2ID: always returns an ID for a category name, adds new category if it didn't exist yet.
Methods Names2IDHash and Names2IDs now allow specification of parent ID to which the categories should belong. This change makes these methods *INCOMPATIBLE* with previous versions of these methods.
New method Categories2IDs added: return the IDs that are associated with the indicated categories.
New method IDCategoryLists2IDs added: return category ID's associated with an ID and a number of category parent ID's.
New method IDAddCategoryList added: add categories to the already existing categories associated with an ID.
New method IDDeleteCategoryList added: delete categories from the already existing categories associated with an ID.
New method IDGetCategoryList added: return categories associated with an ID.
New method IDSetCategoryList added: set the categories associated with an ID.
Support for generic ID2CategoryLIST translation added.
Support for status field added.
First version of this true Perl module.