Liz::EventSet - EventSet module


 use Liz::EventSet;

 $file = new Liz::EventSet;



 use Liz::EventSet;


The Liz::EventSet package allows for very simple storage of sets of events. As such it can function as a database for events associated with a client or a project.

Incorporate into Client Module

The Liz::EventSet 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 EventSet method of module:

 sub EventSet {

 # Obtain the parameters
 # Start the file using the $hn handle as the database handle
 # Return the finished object

 my( $hn,$token ) = @_;
 my( $eventset ) = Liz::EventSet->new( $token,$hn );

Because of the above code in, it is now possible to write the following code:

 $hn = new HN;
 $eventset = $hn->EventSet( 'technology' );

Note that the database connection of the file 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::EventSet->method().


Return list of file identification names of all eventsets in the database specified. Usually not called by itself, but rather incorporated inside a Client Module.

Input Parameters

 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)
Output Parameters

 1 reference to list of identification names in the current database
 2 reference to hash with full names

 $hn = new HN;
 ($id,$name) = $hn->EventSets;
 $eventsets = @{$id};
 print "All $eventsets eventsets in Hospitality Net:\n";
 foreach( @{$id} ) {
   print " EventSet '$$name{$_}' ($_)\n";


 sub EventSets { Liz::EventSet->eventsets( $_[1],$_[0] ) }


Create a new Liz::EventSet object. Creates connection or re-establishes connection with the MySQL database. Usually not called by itself, but rather incorporated inside a Client Module.

Input Parameters

 1 identification name of file set
   (default: default file set for database)
 2 Liz::SQL compatible handle or reference to routine that performs connect
   (default: &Connect from caller's namespace)
Output Parameters

 1 instantiated object
 2 flag: whether the EventSet was just created

 $hn = new HN;
 $file = $hn->EventSet( 'technology' );


 sub EventSet { Liz::EventSet->new( $_[1],$_[0] ) }


The following methods allow changes to information that is associated with an entire eventset.


Quickly add an event to an EventSet without having to open a separate Liz::EventSet::Event object.

Input Parameters

 1 originatorID
 2 description
   (default: none)
 3 options
   (default: none)
 4 status
   (default: 0, between 0..255)
Output Parameters

 1 ID with which the Event was created

 $vsb->EventSet( 'folders' )->AddEvent( $contactID,$self );


Specify or return the current name of the eventset object. The name can be anything to further identify the goal of the eventset.

Input Parameters

 1 new name of eventset
   (default: no change)
Output Parameters

 1 current/old name of eventset

 $xxlink = new xxLINK;
 $eventset = $xxlink->EventSet( 'eurest' );
 $eventset->Name( 'Eurestjes' );


The following methods allow changes to a single event in a EventSet.


Create a new Liz::EventSet::Event object, either from existing information or for a new entry. For more documentation, see the Liz::EventSet::Event object itself.

Input Parameters

 1 ID/name to create Event object with
   (default: none = new file)
 2 sortname of event
   (default: same as name if 1st parameter is name)
Output Parameters

 1 instantiated Event object

 $hn = new HN;
 $eventset = $hn->EventSet( 'technology' );

 $event = $eventset->Event;
 $event = $eventset->Event( 'Toilet Seats' );
 $event = $eventset->Event( $eventID );


Return an SQL statement handle for a list of events.

The following fields may be specified with the 2nd parameter:

 The ID of the event

 The ID of the originator of the event

 The description of the event

 Packed IP-number of originator

 Timestamp value when this file was created

 Timestamp when the file was last updated

 Options associated with the file

 The status of this file
Input Parameters

 1 fields to return (comma delimited)
   (default: 'ID,originatorID,description,IP,created,updated,options,status' );
 2 fieldname on which to order the result
   (default: 'created')
 3 extra condition to be applied
   (default: none)
Output Parameters

 1 SQL statement handle (on which method "fetchrow" can be applied)


Elizabeth Mattijsen ( )


(C) 1998-1999 International Network Consultants


Version 0.17, 25 November 1999

Put module name between quotes to fix obscure bug in Perl 5.005x under ModPerl in method Event.

Version 0.16, 30 September 1999

Now no longer adds Exporter to ISA: it wasn't necessary.

Version 0.15, 20 August 1999

Adapted method new so that any extra fields are handled correctly.

Version 0.14, 16 August 1999

Class methods eventsets now just calls Liz::SQL's ``sets''.

Version 0.13, 14 August 1999

Removed dependency on local GetSetMeta internal subroutine and replaced this with a call to the new method TableMeta of the Liz::SQL module.

Version 0.12, 9 July 1999

Changed all CREATE TABLEs to method calls to the new Liz::SQL 'create' method.

Changed typography to new format.

Version 0.11, 23 June 1999

Changed from using method ``Exists'' to ``Count'' in method new to check for the existence of a table more quickly.

Version 0.1, 9 April 1999

First version of this true Perl module. Copied from the Liz::FileSet module, which is less general than this.