This is Info file pm.info, produced by Makeinfo version 1.68 from the input file bigpm.texi.  File: pm.info, Node: Wizard, Next: Wizard/Examples/Apache, Prev: Win32API/Registry, Up: Module List A framework for building wizard-style applications. *************************************************** NAME ==== Wizard - A framework for building wizard-style applications. SYNOPSIS ======== # Create a new Wizard use Wizard (); my $wiz = Wizard->new(%attr); # Let the wizard create a form my $form = $wiz->Form(%attr); # Start the wizard, by running the form $wiz->Run($form); DESCRIPTION =========== The Wizard package enables you to create simple input forms in the style of Windows wizards and combine them into a complete application, typically for system administration. The users input form is handled in a single sub, the so-called action. Any action consists of 3 phases: 1. Processing the input data. 2. Saving the input data. 3. Returning data describing the next input form. You typically only need to setup the actions, the Wizard system should do anything else for you. The framework is based on the wizard object. Different wizard classes are available, for example Form::Wiz::Shell for running the wizard within a shell or Form::Wiz::HTML for running within a web browser. See also `Wizard::Shell(3)' in this node and `Wizard::HTML(3)' in this node CLASS INTERFACE =============== In all cases errors are handled by throwing Perl exceptions, thus we won't talk about errors at all in what follows. Creating a wizard ----------------- my $wiz = Wizard->new(\%attr); (Class method) The new method will create a wizard object for you. It receives a hash ref of attributes as arguments. Currently known attributes are: formClass The wizards form class. For example, the Wizard::Shell class will have Wizard::Form::Shell as form class. `Wizard::Form(3)' in this node. Working with input forms ------------------------ # Create a new form my $form = $wiz->Form(%attr); # Fetch the current form $form = $wiz->Form(); (Instance methods) The Form method will create a new form for you. The form is an instance of the wizards formClass, see above. There's always a single form associated to the wizard: The previous form is removed by creating the next one. The action returns a list of input elements that will be used for creating the next form. `Wizard::Elem(3)' in this node. Running the wizard ------------------ $form = $wiz->Run($data); (Instance method) This method is running a single action. The action will read input from $data (typically a CGI or Apache::Request object) by calling its param method. The action returns a list of form elements that will be used for creating the next form. This form will be methods return value. AUTHORS AND COPYRIGHT ===================== This module is Copyright (C) 1999 Jochen Wiedmann Am Eisteich 9 72555 Metzingen Germany Email: joe@ispsoft.de Phone: +49 7123 14887 and Amarendran R. Subramanian Grundstr. 32 72810 Gomaringen Germany Email: amar@ispsoft.de Phone: +49 7072 920696 All Rights Reserved. You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.  File: pm.info, Node: Wizard/Examples/Apache, Next: Wizard/Examples/Apache/Directory, Prev: Wizard, Up: Module List Apache Menu =========== Beim Start des Apache Wizard Menues werden folgende Optionen zur Verfuegung gestellt. Host Menu --------- Hier werden Hosts konfiguriert (siehe Host Administration) Apache Wizard Preferences ------------------------- Hier wird die globale Konfiguration mittels folgender Optionen festgelegt: apache_prefs_basedir Base Directory of Apache Wizard Verzeichnis in dem die Daten ueber Hosts, Server, etc... abgelegt werden. AUTHORS AND COPYRIGHT ===================== This module is Copyright (C) 1999 Jochen Wiedmann Am Eisteich 9 72555 Metzingen Germany Email: joe@ispsoft.de Phone: +49 7123 14887 and Amarendran R. Subramanian Grundstr. 32 72810 Gomaringen Germany Email: amar@ispsoft.de Phone: +49 7072 920696 All Rights Reserved. You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.  File: pm.info, Node: Wizard/Examples/Apache/Directory, Next: Wizard/Examples/Apache/Host, Prev: Wizard/Examples/Apache, Up: Module List Directory Menu ============== Hier werden die Verzeichnisse der virtuellen Webserver administriert. Attribute eines Directory. -------------------------- apache_directory_pathname Directory pathname Eindeutiger Pfad des Directory, relativ zum root Verzeichnis des dazugehoerigen virtuellen Webservers. apache_directory_redirecturl Directory redirect url Falls das Verzeichnis ein redirect beschreiben soll, muessen Sie hier die Redirect-Url (Die Url worauf dieses Directory redirected wird) angeben. apache_directory_user User who owns that directory Falls Sie keine Redirect-Url eingegeben haben, muessen Sie hier einen gueltigen User eingeben, der der Besitzer dieses Verzeichnis sein soll. apache_directory_group Group that owns that directory Optionale Eingabe einer gueltigen Gruppe, der dieses Verzeichnis gehoert. AUTHORS AND COPYRIGHT ===================== This module is Copyright (C) 1999 Jochen Wiedmann Am Eisteich 9 72555 Metzingen Germany Email: joe@ispsoft.de Phone: +49 7123 14887 and Amarendran R. Subramanian Grundstr. 32 72810 Gomaringen Germany Email: amar@ispsoft.de Phone: +49 7072 920696 All Rights Reserved. You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.  File: pm.info, Node: Wizard/Examples/Apache/Host, Next: Wizard/Examples/Apache/Server, Prev: Wizard/Examples/Apache/Directory, Up: Module List Host Menu ========= Die Administration der Hosts ist vom gleichen Ablauf wie die Administration weiterer Punkte. CreateHost ---------- Attribute fuer den neuen Host eingeben. Informationen ueber die Attribute befinden sich weiter unten. Danach erhalten sie folgende Auswahl HostSave Save these settings Den neuen Host abspeichern EditHost -------- ModifyHost ---------- Hier muessen Sie zuerst einen vorhanden Host auswaehlen, der geaendert werden soll. Danach wird dieser geladen und kann mittels der Eingabemaske, die auch zum Anlegen von Hosts verwendet wird, abgeandert und anschliessend gespeichert werden. Hier verhaelt sich bis auf die Hostauswahl alles genau wie beim Anlegen von Hosts. DeleteHost ---------- Hier werden Sie mittels einer Auswahlliste gebeten eine Host auszuwaehlen. Anschliessend wird dieser geladen und dessen Daten werden angezeigt. Nun gibt es drei Moeglichkeiten fortzufahren. Yes, delete it Den Host loeschen, aber das Datenverzeichnis in dem sich die alle Daten die zu diesem Host gehoeren, nicht loeschen. Yes, delete it, including data directory Dasselbe wie oben, wobei aber das Datenverzeichnis auch geloescht wird. Return to Host Menu/Top Menu Zu dem Host Menu bzw. zu dem Anfangsmenue zurueckkehren ohne den Host oder dessen Datenverzeichnis zu loeschen. Attribute eines Hosts --------------------- apache_host_name short descriptive name Eindeutiger Name, der dem Host zugeordnet ist. Falls Sie einen neuen Host anlegen wollen der den selben Namen hat wie ein bereits vorhandener, wird ein Fehler ausgeloest. Beispiel: wwwhost1 apache_host_descr informative description Beschreibung des Hosts. Beispiel: My webserver machine apache_host_arch architecture Die Host Architektur. Beispiel: linux-i586 apache_host_ip DNS name or ip address Gueltige IP Adresse oder DNS name des Hosts. Falls eine ungueltiger DNS Name oder IP Adresse eingegeben wird, wird ein Fehler ausgeloest. Beispiel: iss12.neckar-alb.de AUTHORS AND COPYRIGHT ===================== This module is Copyright (C) 1999 Jochen Wiedmann Am Eisteich 9 72555 Metzingen Germany Email: joe@ispsoft.de Phone: +49 7123 14887 and Amarendran R. Subramanian Grundstr. 32 72810 Gomaringen Germany Email: amar@ispsoft.de Phone: +49 7072 920696 All Rights Reserved. You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.  File: pm.info, Node: Wizard/Examples/Apache/Server, Next: Wizard/Examples/Apache/VirtualServer, Prev: Wizard/Examples/Apache/Host, Up: Module List Server Menu =========== Hier werden die WWW server konfiguriert. Beim Anlegen eines neuen Servers wird automatisch ein Virtueller Server angelegt der den angelegten WWW server beschreibt. Beim anlegen des Virtuellen Severs wird automatisch ein Directory angelegt, dass das Root Verzeichnis des virtuellen Servers beschreibt. Naeheres in der Sektion VirtualServer Menu und Directory Menu. Im folgenden werden nur noch die Attribute beschrieben. Die Menupunkte und deren Funktion ist analog zum Host Menu. Attribute eines Servers ----------------------- apache_server_name Server descriptive name. Eindeutiger Name des Servers (analog zu Hosts) apache_server_ip Server DNS name or IP adress DNS Name oder IP Adresse des Servers, analog zu Hosts. apache_server_vserver_root Default directory for VirtualServers Standardprefix fuer die Rootverzeichnisse der virtuellen Sever. Zum Beispiel '/usr/local/www'. Beim Anlegen eines virtuellen Servers 'www.test.de' wird dann als root verzeichnis '/usr/local/www/www.test.de' vorgeschlagen.. Naeheres finden Sie in der Sektion VirtualServer Menue. apache_server_admin Server Administrator Email adresse des Webmasters des Webservers. apache_server_http_port HTTP Default HTTP port der als Standard fuer die virtuellen Server verwendet wird. apache_server_https_port HTTP, HTTPS Port Default HTTPS Port der als Standard fuer die virtuellen Server verwendet wird. AUTHORS AND COPYRIGHT ===================== This module is Copyright (C) 1999 Jochen Wiedmann Am Eisteich 9 72555 Metzingen Germany Email: joe@ispsoft.de Phone: +49 7123 14887 and Amarendran R. Subramanian Grundstr. 32 72810 Gomaringen Germany Email: amar@ispsoft.de Phone: +49 7072 920696 All Rights Reserved. You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.  File: pm.info, Node: Wizard/Examples/Apache/VirtualServer, Next: Wizard/HTML, Prev: Wizard/Examples/Apache/Server, Up: Module List VirtualServer Menu ================== Hier werden die virtuellen Webserver administriert. Die Menuoptionen und der Verlauf ist analog zu dem Server Menu. Lediglich die Attributseingabe erfolgt in zwei Schritten, wobei nach dem ersten Schritt abgebrochen werden kann. Beim Anlegen eines neuen virtuellen Webservers wird automatisch ein Verzeichnis angelegt, dass das root Verzeichnis des angelegten virtuellen Webservers entspricht, Naehres finden sie im Abschnitt Directory Menu. Attribute eines virtuellen Webservers ------------------------------------- apache_virtualserver_name DNS name or IP address Gueltiger DNS name oder IP Adresse (siehe analoge Attribute fuer Hosts, Server) apache_virtualserver_http_mode Server type Hier koennen Sie den Servertyp einstellen, die Auswahl besteht aus 'http', 'https' oder 'both'. Falls 'https' oder 'both' ausgewaehlt wird, hat das zur Folge das als HTTP version HTTP/1.0 automatisch eingestellt wird. Falls 'http' ausgewaehlt wird hat man die Moeglichkeit zwischen HTTP/1.0 oder HTTP/1.1 auszuwaehlen. apache_virtualserver_root Virtual WWW server root directory Das root Verzeichnis des virtuellen Webservers. apache_virtualserver_admin Virtual WWW server admin Email adresse des Webmasters. apache_virtualserver_http_port HTTP port HTTP Port auf den der virtuelle Server hoeren soll, falls nichts eingegeben wird, wird der des Servers, zu dem dieser virtuelle Webserver gehoert, verwendet. apache_virtualserver_https_port HTTPS port Nur falls 'https' oder 'both' als 'Server type' ausgewaehlt wurde. Analog zu HTTP port. apache_virtualserver_http_version HTTP version Nur falls 'http' als 'Server type' ausgewaehlt wurde. apache_virtualserver_interface Virtual WWW server interface number Eine eindeutige interface Nummer (Ganzzahl) des virtuellen Webservers. Die Eingabe kann leergelassen werden falls 'http' als 'Server type' und HTTP/1.1 als 'HTTP version' ausgwaehlt wurde. apache_virtualserver_DirectoryIndex DirectoryIndex, Options Analog zu den entsprechenden Apache Konfigurationsoptionen (wird mit sinvollen defaults vorbelegt) apache_virtualserver_enable_pcgi PCGI/EP/SSI Hier koennen Sie einstellen ob der virtuelle Webserver PCGI, EP oder SSI (Server Side Includes) unterstuetzen soll. AUTHORS AND COPYRIGHT ===================== This module is Copyright (C) 1999 Jochen Wiedmann Am Eisteich 9 72555 Metzingen Germany Email: joe@ispsoft.de Phone: +49 7123 14887 and Amarendran R. Subramanian Grundstr. 32 72810 Gomaringen Germany Email: amar@ispsoft.de Phone: +49 7072 920696 All Rights Reserved. You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.  File: pm.info, Node: Wizard/HTML, Next: Wizard/LDAP, Prev: Wizard/Examples/Apache/VirtualServer, Up: Module List A subclass for running Wizard applications in HTML::EP. ******************************************************* NAME ==== Wizard::HTML - A subclass for running Wizard applications in HTML::EP. SYNOPSIS ======== # Create a new HTML wizard use Wizard::HTML; my $wiz = Wizard::Shell->new('form' => $form, 'ep' => $ep) DESCRIPTION =========== The HTML wizard is a subclass of Wizard, that is used by HTML::EP sites. The input will be read from the associated CGI-Object and the output as HTML code will be built by the elements of the form. AUTHORS AND COPYRIGHT ===================== This module is Copyright (C) 1999 Jochen Wiedmann Am Eisteich 9 72555 Metzingen Germany Email: joe@ispsoft.de Phone: +49 7123 14887 and Amarendran R. Subramanian Grundstr. 32 72810 Gomaringen Germany Email: amar@ispsoft.de Phone: +49 7072 920696 All Rights Reserved. You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.  File: pm.info, Node: Wizard/LDAP, Next: Wizard/LDAP/User, Prev: Wizard/HTML, Up: Module List Administration interface for your LDAP server ********************************************* NAME ==== Wizard::LDAP - Administration interface for your LDAP server SYNOPSIS ======== # From the shell: ldapWizard # Or, from the WWW: LDAP administration DESCRIPTION =========== This is a package for administration of an LDAP server. It allows to feed users, hosts and networks into the server. INSTALLATION ============ First of all, you have to install the prerequisites. There are lots of: An LDAP Server You need some LDAP server. We are using the OpenLDAP server, see http://www.openldap.org/ In theory any other LDAP server should do, but the servers configuration might be different. A source RPM for Red Hat Linux is available on demand. To configure the LDAP server, edit the file `topics.ldif' from the distribution. Currently it looks like dc=ispsoft, dc=de objectclass: organization o: My Organization Name dn: topic=user, dc=ispsoft, dc=de name: user objectclass: topic dn: topic=net, dc=ispsoft, dc=de name: net objectclass: topic Change "dc=ispsoft, dc=de" and the organization name to reflect your local settings. For example, if you are using the mail domain "mycompany.com", then you might choose dc=mycompany, dc=com Import the file into your LDAP server by using the command ldif2ldbm -i topics.ldif (The above command will trash an existing LDAP database! Use ldapadd if you want to avoid this.) Append the files `slapd.at.conf.APPEND' and `slapd.oc.conf.APPEND' to your `/etc/openldap/slapd.at.conf' and `/etc/openldap/slapd.oc.conf' and restart the OpenLDAP server. IO::AtomicFile This is a Perl package for atomic operations on important files. HTML::EP If you like to use the WWW administration interface, you need the embedded Perl system HTML::EP. Wizard Another Perl module, available at the same place. Convert::BER Net::LDAP To talk to the LDAP server, we use Graham Barr's Net::LDAP package. It is written in 100% Perl, no underlying C library required. Net::Netmask Used to determine conformance of host IPīs to a network. All the above packages are available on any CPAN mirror, for example ftp://ftp.funet.fi/pub/languages/perl/CPAN/authors/id or perhaps at the same place where you found this file. :-) Note that some of the packages have their own requirements. For example, HTML::EP depends on libwww and the MailTools. If so, you will be told while installing the modules. See below for the installation of the Perl modules. Installing the Perl modules --------------------------- Installing a Perl module is always the same: gzip -cd Wizard-LDAP-0.1005.tar.gz | tar xf - cd Wizard-LDAP-0.1005 perl Makefile.PL make make test make install Alternatively you might try using the automatic installation that the CPAN module offers you: perl -MCPAN -e shell install Bundle::Wizard::LDAP Note that some of the modules, in particular HTML::EP, need additional configuration tasks, for example modifying the web servers configuration files. Some final tasks ---------------- You have to create a directory `/etc/Wizard-LDAP' and make it owned by the httpd user, so that CGI binaries can write into this directory. Copy the file `ldap.ep' and the file `gethelp.ep' from the Wizard distribution into your web servers root directory. (I choose `/home/httpd/html/admin/ldap.ep' on my Red Hat Linux box.) Point your browser too the corresponding location, for example http://localhost/admin/ldap.ep Start with modifying the preferences. See `THE LDAP-WIZARD PREFERENCES' in this node. THE LDAP-WIZARD PREFERENCES =========================== The system wide preferences are accessible via the web form ldap.ep. The following items can be configured: item_ldap_prefs_serverip ------------------------ This is the IP address of the LDAP server being used, typically 127.0.0.1. No default is set. item_ldap_prefs_serverport -------------------------- Likewise, this is the LDAP servers port number. The default is 389 item_ldap_prefs_adminDN ----------------------- This is the distinguished name to use for accessing the LDAP server as root. No default is set. Example: cn=root, dc=ispsoft, dc=de item_ldap_prefs_adminPassword ----------------------------- This is the password to use for binding to the LDAP server as root. Currently the password *must* be stored in clear text. (This is subject to change.) item_ldap_prefs_nextuid ----------------------- This the next numeric UID, that will assigned to a new user. By default the value 500 is choosen. The value is incremented with any new user, so after inserting the next users it will be 501, 502, 503 and so on. You typically should reserve some block of Unix UID's for users managed by the LDAP server. item_ldap_prefs_gid ------------------- This is the numeric GID, that your LDAP users will have under Unix. The default is 500 item_ldap_prefs_home -------------------- This is the prefix to use for the users home directories, for example /home (the default). The users login names will be appended. item_ldap_prefs_userbase ------------------------ This is a suffix for constructing the distinguished names of your users. Example: dc=ispsoft, dc=de item_ldap_prefs_netbase ----------------------- A similar suffix for constructing the distinguished names of nets. Example: dc=ispsoft, dc=de item_ldap_prefs_domain ---------------------- The mail domain appended to unclassified email adresses. For example, if you have a user "joe" and the domain is "ispsoft.de", then its email adress will be joe@ispsoft.de. item_ldap_prefs_prefschange --------------------------- If you enter a shell command here, then this command will be launched after any change of the preferences. Example: /usr/bin/ldapAdmin --prefs item_ldap_prefs_hostchange -------------------------- This is a similar shell command that will be called after hosts have changed. Example: /usr/bin/ldapAdmin --hosts item_ldap_prefs_netchange ------------------------- A shell command to issue after network definitions have changed. Example: /usr/bin/ldapAdmin --nets item_ldap_prefs_userchange_new ------------------------------ This is a special case of the command for changing users. If defined, it will be issued after a user was created. The users name will be appended as the last argument. If not defined, the above and more generic command will be executed. item_ldap_prefs_userchange_modify --------------------------------- Similar to item_ldap_prefs_userchange_new, but for modified users. Again, the users name will be appended as a last argument. item_ldap_prefs_userchange_delete --------------------------------- Finally a shell command being executed after a user has been deleted. The users name will be appended as a last argument. AUTHORS AND COPYRIGHT ===================== This module is Copyright (C) 1999 Jochen Wiedmann Am Eisteich 9 72555 Metzingen Germany Email: joe@ispsoft.de and Amarendran R. Subramanian Grundstr. 32 72810 Gomaringen Germany Email: amar@ispsoft.de All Rights Reserved. You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file. SEE ALSO ======== *Note Wizard: Wizard,, `ldapWizard' in this node, *Note HTML/EP: HTML/EP,, *Note Net/LDAP: Net/LDAP,  File: pm.info, Node: Wizard/LDAP/User, Next: Wizard/SaveAble, Prev: Wizard/LDAP, Up: Module List A base class for implementing users in the LDAP wizard ****************************************************** NAME ==== Wizard::LDAP::User - A base class for implementing users in the LDAP wizard SYNOPSIS ======== # From the shell: ldapWizard # Or, from the WWW: LDAP administration # Follow the "User menu" DESCRIPTION =========== This package implements the handling of user objects in the LDAP server. It is part of the LDAP wizard. CREATING OR EDITING USERS ========================= The following items can be edited in the user window: item_ldap_user_uid ------------------ This is the users login name, for example joe You should restrict login names to 8 characters. item_ldap_user_userpassword --------------------------- This is the users password. You *must* fill in a password. item_ldap_user_cn ----------------- This is the users real name, for example Jochen Wiedmann item_ldap_user_description -------------------------- This is a single-line description of the user. item_ldap_user_mail ------------------- This is the users email adress, for example joe@ispsoft.de You may omit the domain part in which case the default domain from the preferences will automatically be added. item_ldap_user_mailforward -------------------------- If mail for the user must not be stored locally, but forwarded to an external email account, then you have to fill in this field, the external email address. item_ldap_user_mailforwardtype ------------------------------ This select box determines, when email is being forwarded. It is ignored, if the mailforward (see above) is empty. The default is to forward mails always (in other words: Immediately). You may however choose to wait 1-5 days before forwarding email. The latter option requires support from your mailserver, for example by a cron job that takes care of forwarding. item_ldap_user_pop3box ---------------------- If the user has an external POP3 boxes, you may insert them here, for example username@my.pop3.server The attribute is used by a cron job that is regularly mail from the remote box. The mail is then forwarded to the user. This option requires support from your mailserver, for example by a cron job. item_ldap_user_pop3password --------------------------- Likewise, this is the password being used to fetch mail from the remote POP3 box, if any. item_ldap_user_status --------------------- By default users have a status of "mail": In other words, they may read mail only. They may also have a status of "ftp", in which case they are accepted to login via FTP or "admin", in which case they have a regular shell account. The users status determines its login shell. The possible shells are /bin/mailonly /bin/ftp_mail /bin/bash AUTHORS AND COPYRIGHT ===================== This module is Copyright (C) 1999 Jochen Wiedmann Am Eisteich 9 72555 Metzingen Germany Email: joe@ispsoft.de and Amarendran R. Subramanian Grundstr. 32 72810 Gomaringen Germany Email: amar@ispsoft.de All Rights Reserved. You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file. SEE ALSO ======== *Note Wizard: Wizard,, `ldapWizard' in this node, *Note HTML/EP: HTML/EP,, *Note Net/LDAP: Net/LDAP,  File: pm.info, Node: Wizard/SaveAble, Next: Wizard/SaveAble/LDAP, Prev: Wizard/LDAP/User, Up: Module List A package for automatically saved objects. ****************************************** NAME ==== Wizard::SaveAble - A package for automatically saved objects. SYNOPSIS ======== # Tell a SaveAble object that it's modified $obj->Modified(1); # Tell the SaveAble object to store itself back to disk $obj->Store(); DESCRIPTION =========== An object of the class Wizard::SaveAble is something that knows whether it has to be saved or not. To that end it offers methods like *Modified* and Store. CLASS INTERFACE =============== All methods are throwing a Perl exception in case of errors. Constructors ------------ # Create an empty SaveAble object and associate a file name to it. my $obj = Wizard::SaveAble->new('file' => $file); # Load a SaveAble object from a file. my $obj = Wizard::SaveAble->new($file); # Same thing, but creating an empty object if $file doesn't exist my $obj = Wizard::SaveAble->new('file' => $file, 'load' => 1); (Class method) There are two possible constructors for the *Wizard::SaveAble* class: The first is creating an empty object, you typically use a subclass of *Wizard::SaveAble* here. The most important attribute is the file name where the object should later be stored. The other constructor is loading an already existing object from a file. The object is automatically blessed into the same class again, typically a subclass of Wizard::SaveAble. Setting and Querying an objects status -------------------------------------- # Tell an object that it's modified $obj->Modified(1); # Query whether an object is modified $modified = $obj->Modified() (Instance methods) The *Modified* method is used to determine whether an object needs to be saved or not. Setting and Querying an objects file name ----------------------------------------- # Set the objects associated file $obj->File($file); # Query the objects associated file $file = $obj->File(); (Instance methods) The *Modified* method is used to determine whether an object needs to be saved or not. Storing an object to disk ------------------------- $obj->Store(); (Instance Method) The object is stored back to disk into the file that was fixed within the constructor. AUTHORS AND COPYRIGHT ===================== This module is Copyright (C) 1999 Jochen Wiedmann Am Eisteich 9 72555 Metzingen Germany Email: joe@ispsoft.de Phone: +49 7123 14887 and Amarendran R. Subramanian Grundstr. 32 72810 Gomaringen Germany Email: amar@ispsoft.de Phone: +49 7072 920696 All Rights Reserved. You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file. SEE ALSO ======== `Wizard(3)' in this node, `Wizard::State(3)' in this node  File: pm.info, Node: Wizard/SaveAble/LDAP, Next: Wizard/SaveAble/ShellVars, Prev: Wizard/SaveAble, Up: Module List A package for automatically saved objects, that are stored in a LDAP server's directory structure. ****************************************************************************************************** NAME ==== Wizard::SaveAble::LDAP - A package for automatically saved objects, that are stored in a LDAP server's directory structure. SYNOPSIS ======== DESCRIPTION =========== AUTHORS AND COPYRIGHT ===================== This module is Copyright (C) 1999 Jochen Wiedmann Am Eisteich 9 72555 Metzingen Germany Email: joe@ispsoft.de Phone: +49 7123 14887 and Amarendran R. Subramanian Grundstr. 32 72810 Gomaringen Germany Email: amar@ispsoft.de Phone: +49 7072 920696 All Rights Reserved. You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file. SEE ALSO ======== `Wizard::SaveAble(3)' in this node, `Wizard(3)' in this node, `Wizard::State(3)' in this node  File: pm.info, Node: Wizard/SaveAble/ShellVars, Next: Wizard/Shell, Prev: Wizard/SaveAble/LDAP, Up: Module List AUTHORS AND COPYRIGHT ===================== This module is Copyright (C) 1999 Jochen Wiedmann Am Eisteich 9 72555 Metzingen Germany Email: joe@ispsoft.de Phone: +49 7123 14887 and Amarendran R. Subramanian Grundstr. 32 72810 Gomaringen Germany Email: amar@ispsoft.de Phone: +49 7072 920696 All Rights Reserved. You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file. SEE ALSO ======== `Wizard(3)' in this node, `Wizard::State(3)' in this node  File: pm.info, Node: Wizard/Shell, Next: Wizard/State, Prev: Wizard/SaveAble/ShellVars, Up: Module List A subclass for running Wizard applications in a shell. ****************************************************** NAME ==== Wizard::Shell - A subclass for running Wizard applications in a shell. SYNOPSIS ======== # Create a new shell wizard use Wizard::Shell; my $wiz = Wizard::Shell->new('form' => $form) DESCRIPTION =========== The Shell wizard is a subclass of Wizard, that will run in a shell. The input elements are written to stdout and the application will query you for input. AUTHORS AND COPYRIGHT ===================== This module is Copyright (C) 1999 Jochen Wiedmann Am Eisteich 9 72555 Metzingen Germany Email: joe@ispsoft.de Phone: +49 7123 14887 and Amarendran R. Subramanian Grundstr. 32 72810 Gomaringen Germany Email: amar@ispsoft.de Phone: +49 7072 920696 All Rights Reserved. You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.  File: pm.info, Node: Wizard/State, Next: WordNet/Query, Prev: Wizard/Shell, Up: Module List A class for storing the Wizard state. ************************************* NAME ==== Wizard::State - A class for storing the Wizard state. SYNOPSIS ======== # Create a new state my $state = Wizard::State->new(); DESCRIPTION =========== A Wizard can be interpreted as a very simple finite state machine. The state is stored in ab object of class Wizard::State. A wizard state is typically a collection of Wizard::SaveAble objects. For example, while configuring an Apache webserver, the state might have attributes *prefs* (global preferences), host (the machine where the webserver is running on) and server (the web server), each of them being a SaveAble object. If the state's Store method is called, then the Store method is called for any of these objects, as if they were a single object. CLASS INTERFACE =============== Constructor ----------- my $state = Wizard::State->new(\%attr) (Class Method) A new object is generated by calling its new method. The object attributes are passed as a hash ref. Terminating the application --------------------------- # Stopping the application $state->Running(0); # Querying whether the application is running $is_running = $state->Running(); (Instance method) The state's Running method can be used to set or get its running attribute. This attribute will be set to 0 for stopping the application. Storing a state --------------- # Storing a state temporarily; real SaveAble objects won't be # changed $state->Store($wiz); # Storing a state, including the SaveAble objects. $state->Store($wiz, 1); AUTHORS AND COPYRIGHT ===================== This module is Copyright (C) 1999 Jochen Wiedmann Am Eisteich 9 72555 Metzingen Germany Email: joe@ispsoft.de Phone: +49 7123 14887 and Amarendran R. Subramanian Grundstr. 32 72810 Gomaringen Germany Email: amar@ispsoft.de Phone: +49 7072 920696 All Rights Reserved. You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.  File: pm.info, Node: WordNet/Query, Next: WordNet/QueryData, Prev: Wizard/State, Up: Module List perl interface for noun relations of WordNet ******************************************** NAME ==== WordNet::Query - perl interface for noun relations of WordNet SYNOPSIS ======== use WordNet::Query; print "Definition: ", &gloss ("car\#1"), "\n"; print "Synset: ", join (", ", &syns ("car\#1")), "\n"; print "Hypernyms: ", join (", ", &hype ("car\#1")), "\n"; my @hypes = &hype("car\#1"); print "Hype Synset: ", join (", ", &syns ($hypes[0])), "\n"; print "Hype-Hypernyms: ", join (", ", &hype ($hypes[0])), "\n"; print "Hyponyms: ", join (", ", &hypo ("car\#1")), "\n"; print "Meronyms: ", join (", ", &mero ("car\#1")), "\n"; print "Holonyms: ", join (", ", &holo ("roof\#2")), "\n"; my @sensearray = &syns ("car"); print "Num Senses: ", scalar @sensearray, "\n"; for (my $i=0; $i < scalar @sensearray; $i++) { print $i+1, ") ", join (", ", @{$sensearray[$i]}), "\n"; } DESCRIPTION =========== The WordNet::Query perl module uses the 'wn' command-line program to give a more palatable interface to the WordNet system. Before the WordNet perl module can be used, the WordNet C code must be installed on your system and the 'wn' executable must be located in a directory that is part of your PATH variable. When a query is performed, the module gathers data from 'wn', caches it in memory and returns the requested information. This mechanism makes accessing WordNet information both efficient and more natural. The WordNet module requires little effort to traverse the various graphs of information that are available in the WordNet system. USAGE ===== The WordNet::Query module includes six exported functions, each of which operate in two different modes. The functions are: syns - Returns the synonym set of the provided word gloss - Returns the glossary definition of the provided word hype - Returns all hypernyms one level above the provided word hypo - Returns all hyponyms one level below the provided word mero - Returns all meronyms (part/member/substance of parents) of the provided word holo - Returns all holonyms (part/member/substance of children) of the provided word Each word accepts a single string that is the word to be queried. In the case that the exact sense of the word is known, that may be provided in the string using the #S notation (where 'S' is the sense number). For example, 'car#1' refers to the first sense of the word 'car'. The output of each of these function depends on the format of the input and is probably best described by the examples provided in the SYNOPSIS section (above). Generally, if a specific sense is provided (e.g. 'window#2'), then a list of strings is returned, one for each found instance of the requested object. In the case of the 'gloss' function, a single item is returned (the single definition of that word). If no specific sense is provided, then an array of references is returned. Each reference will point to a list of strings, corresponding to the list that would have been returned given a specific sense query. The array of referneces is ordered according to sense number, with sense #1 coming first and the largest sense coming last. i.e. add one to the array index to get the sense number. NOTES ===== Requires existence of WordNet command line program, 'wn'. Currently only allows WordNet queries on noun forms. COPYRIGHT ========= Copyright 1999 Jason Rennie All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO ======== perl(1) http://www.cogsci.princeton.edu/~wn/ http://www.ai.mit.edu/~jrennie/WordNet/ LOG === $Log: Query.pm,v $ Revision 1.2 1999/09/15 19:53:28 jrennie add URL Revision 1.1 1999/09/15 13:27:54 jrennie new Query directory Revision 1.3 1999/07/22 21:12:25 jrennie add lower; lowercase everything; put all verbosity output on STDERR Revision 1.2 1999/07/22 18:54:24 jrennie add hype_set, level functions; have all parse_* functions return -1 if nothing is found; have export functions return empty list or undef if nothing is found Revision 1.1 1999/07/21 20:08:51 jrennie rename from WordNet.pm; modify initialization code to allow direct access to findtheinfo function; in future, plan to rely soley on findtheinfo (no more command-line 'wn' execution) Revision 1.5 1999/07/20 16:17:09 jrennie missing '>' in hash dereference Revision 1.4 1999/07/19 14:19:53 jrennie use CVS for versioning ($VERSION line taken from CPAN suggestion) Revision 1.3 1999/07/19 14:09:19 jrennie various fixes in parsing of 'wn' output - particularly for special cases ('wn' does not have the requested information) Revision 1.2 1999/07/16 19:51:06 jrennie deal with empty holo or mero wn output (different from other queries) Revision 1.1.1.1 1999/07/16 18:27:02 jrennie move WordNet to separate directory Revision 1.9 1999/07/16 18:04:12 jrennie bug fix--forgot to convert synlist to hash Revision 1.8 1999/07/16 14:55:48 jrennie various clean up to make "use strict" happy; do the right thing for top and bottom of tree Revision 1.7 1999/07/15 16:41:09 jrennie updated documentation Revision 1.6 1999/07/15 15:27:42 jrennie allow arbitrary sense querying Revision 1.5 1999/07/14 22:38:48 jrennie complete rewrite; created separate function for each aspect of wordnet (gloss, synset, hype, hypo, mero, holo); still need to allow for querying w/o a specific sense Revision 1.4 1999/07/13 15:28:22 jrennie add example for ambiguous mode Revision 1.3 1999/07/13 15:16:50 jrennie Follow guidelines in perl FAQ Revision 1.2 1999/07/13 13:48:09 jrennie quote query words passed to wn  File: pm.info, Node: WordNet/QueryData, Next: X11/Auth, Prev: WordNet/Query, Up: Module List direct perl interface to WordNet database ***************************************** NAME ==== WordNet::QueryData - direct perl interface to WordNet database SYNOPSIS ======== use WordNet::QueryData; # Load index, mophological exclusion files (time-consuming process) my $wn = WordNet::QueryData->new ("/usr/local/dict", 1); # Synset of cat, sense #7 print "Cat#7-> ", join (", ", $wn->query ("cat#n#7", "syns")), "\n"; # Hyponyms of cat, sense #1 (house cat) print "Cat#1-> ", join (", ", $wn->query ("cat#n#1", "hypo")), "\n"; # Senses of run as a verb print "Run->", join (", ", $wn->query ("run#v")), "\n"; # Base form(s) of the verb 'lay down' print "lay down-> ", join (", ", $wn->valid_forms ("lay down#v")), "\n"; DESCRIPTION =========== WordNet::QueryData provides a direct interface to the WordNet database files. It requires the WordNet package (http://www.cogsci.princeton.edu/~wn/). It allows the user direct access to the full WordNet semantic lexicon. All parts of speech are supported and access is generally very efficient because the index and morphical exclusion tables are loaded at initialization. Things are more or less optimized for long sessions of queries--the 'new' invocation load the entire index table and all of the morphological exclusions. My PII/400 takes about 15 seconds to do this. Memory usage is on the order of 18 Megs. If I get enough requests, I may work on making this a less demanding step. However, once the index and morph. exc. files are loaded, queries are very fast. USAGE ===== To use the WordNet::QueryData module, incorporate the package with "use WordNet::QueryData;". Then, establish an instance of the package with "my $wn = new WordNet::QueryData ("/usr/local/dict");". If the WordNet dict is not located in /usr/local/dict on your system, pass the correct directory as the first argument of the function call. You may pass a second argument of 1 if you wish the module to print out progress and verbose error messages. WordNet::QueryData is object-oriented. You can establish multiple instances simply by using 'new' multiple times, however, the only practical use I can see for this is comparing data from different WordNet versions. I did the module OO-style because I had never done an OO perl module, figured it was time to learn and thought it might make the code a bit cleaner. The WordNet::QueryData object has two object functions that you might want to use, 'valid_forms' and 'query'. 'query' gives you direct access to the large set of WordNet relations. It accepts a query string and a relation. The query string may be at one of three specification levels: 1) WORD (e.g. dog) 2) WORD#POS (e.g. house#noun) 3) WORD#POS#SENSE (e.g. ghostly#adj#1) WORD is simply an english word. Spaces should be used to separate tokens (not underscores as is used in the WordNet database). Case does not matter. In order to get a meaningful result, the word must exactly match one of the words in the WordNet database files. Use 'valid_forms' to determine the form in which WordNet stores the word. POS is the part of speech. Use 'n' for noun, 'v' for verb, 'a' for adjective and 'r' for adverb. You may also use full names and some abbreviations (as above and in test.pl). POS is optional for calls to 'query', and required for calls to 'valid_forms'. SENSE is a number that uniquely identifies the word sense. You can 'query' using a WORD#POS form to get a list of the word's senses for that part of speech. Executing 'query' with only a WORD will return a list of WORD#POS strings. Passing 'query' a WORD#POS will return a list of WORD#POS#SENSE strings. 'query' calls of these forms do not return any information about WordNet relations pertaining to WORD. The third format, WORD#POS#SENSE, requires a second argument, RELATION, which may be any of the strings used by WordNet to designate a relation. Here is a list of most (if not all) of them: syns - synset words ants - antonyms hype - hypernyms hypo - hyponyms mmem - member meronyms msub - substance meronyms mprt - part meronyms mero - all meronyms hmem - member holonyms hsub - substance holonyms hprt - part holonyms holo - all holonyms attr - attributes (?) enta - entailment (verbs only) caus - cause (verbs only) also - also see vgrp - verb group (verbs only) sim - similar to (adjectives only) part - participle of verb (adjectives only) pert - pertainym (pertains to noun) (adjectives only) glos - word definition Such queries return a list of corresponding strings in the WORD#POS#SENSE format. In the case of 'syns', one string is returned for each word that is part of the synset. For other relations, one WORD#POS#SENSE string is returned for each synset (you can map 'syns' on to the returned array to get a full list of the words for a relation). In the case of relations like 'hype' and 'hypo', query returns only the immediate hypernyms or hyponyms. You can use 'query' recursively to get a full hyper/hyponym tree. While 'query' requires that WORD exactly matches an entry in WordNet, QueryData has functionality for determining the WordNet baseforms to which a particular WORD may correpsond. This functionality is encapsulated in 'valid_forms'. After suppling 'valid_forms' with QUERY, a string in the form WORD#POS, 'valid_forms' will return a list of WORD#POS strings which are existing WordNet entries that are base forms of QUERY. Normally, one string will be returned. An empty list will be returned if QUERY is not a word that WordNet knows about. QueryData also has functionality for retrieving WordNet datafile offsets (the unique number that identifies a word sense). The function 'offset' accepts a fully-qualified word sense in the form WORD#POS#SENSE and returns the corresponding numerical offset. See WordNet documentation for more information about this quantity. NOTES ===== Requires access to WordNet database files (data.noun, index.noun, etc.) COPYRIGHT ========= Copyright 2000 Jason Rennie All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO ======== perl(1) http://www.cogsci.princeton.edu/~wn/ http://www.ai.mit.edu/~jrennie/WordNet/  File: pm.info, Node: X11/Auth, Next: X11/Keysyms, Prev: WordNet/QueryData, Up: Module List Perl module to read X11 authority files *************************************** NAME ==== X11::Auth - Perl module to read X11 authority files SYNOPSIS ======== require X11::Auth; $a = new X11::Auth; ($auth_type, $auth_data) = $a->get_by_host($host, $disp_num); DESCRIPTION =========== This module is an approximate perl replacement for the libXau C library and the xauth(1) program. It reads and interprets the files (usually '~/.Xauthority') that hold authorization data used in connecting to X servers. Since it was written mainly for the use of X11::Protocol, its functionality is currently restricted to reading, not writing, of these files. METHODS ======= new --- $auth = X11::Auth->new; $auth = X11::Auth->open($filename); Open an authority file, and create an object to handle it. The filename will be taken from the XAUTHORITY environment variable, if present, or '.Xauthority' in the user's home directory, or it may be overridden by an argument. 'open' may be used as a synonym. get_one ------- ($family, $host_addr, $display_num, $auth_name, $auth_data) = $auth->get_one; Read one entry from the file. Returns a null list at end of file. $family is usually 'Internet' or 'Local', and $display_num can be any string. get_all ------- @auth_data = $auth->get_all; Read all of the entries in the file. Each member of the array returned is an array ref similar to the list returned by get_one(). get_by_host ----------- ($auth_name, $auth_data) = $auth->get_by_host($host, $family, $display_num); Get authentication data for a connection of type $family to display $display_num on $host. If $family is 'Internet', the host will be translated into an appropriate address by gethostbyname(). COMPATIBILITY ============= The following table shows the (rough) correspondence between libXau calls and X11::Auth methods: libXau X11::Auth ------ --------- XauFileName $ENV{XAUTHORITY} || "$ENV{HOME}/.Xauthority" fopen(XauFileName(), "rb") $auth = new X11::Auth XauReadAuth $auth->get_one XauWriteAuth XauGetAuthByAddr $auth->get_by_host XauGetBestAuthByAddr XauLockAuth XauUnlockAuth XauDisposeAuth AUTHOR ====== Stephen McCamant SEE ALSO ======== `perl(1)' in this node, *Note X11/Protocol: X11/Protocol,, `Xau(3)' in this node, `xauth(1)' in this node, lib/Xau/README in the X11 source distribution.