ActivePerl Documentation
|
NAMEXML::PPMConfig - PPMConfig file format and XML parsing elements
SUPPORTED PLATFORMS
SYNOPSISuse XML::Parser; use XML::PPMConfig; $p = new XML::Parser( Style => 'Objects', Pkg => 'XML::PPMConfig' ); ...
DESCRIPTIONThis module provides a set of classes for parsing PPM configuration files using
the
MAJOR ELEMENTS
PPMCONFIGDefines a PPM configuration file. The root of a PPMConfig document is always a PPMCONFIG element.
PACKAGEChild of PPMCONFIG, used to describe a Perl Package which has already been installed. Multiple instances are valid. The PACKAGE element allows for the following attributes:
MINOR ELEMENTS
PPMVERChild of PPMCONFIG, used to state the version of PPM for which this configuration file is valid. A single instance should be present.
PLATFORMChild of PPMCONFIG, used to specify the platform of the target machine. A single instance should be present. The PLATFORM element allows for the following attributes:
REPOSITORYChild of PPMCONFIG, used to specify a repository where Perl Packages can be found. Multiple instances are valid. The REPOSITORY element allows for the following attributes:
OPTIONSChild of PPMCONFIG, used to specify the current configuration options for PPM. A single instance should be present. The OPTIONS element allows for the following attributes:
PPMPRECIOUSChild of PPMCONFIG, used to specify the modules which PPM itself is dependant upon. A single instance should be present.
LOCATIONChild of PACKAGE, used to specify locations at which to search for updated versions of the PPD file for this package. Its value can be either a directory or an Internet address. A single instance should be present.
INSTDATEChild of PACKAGE, used to specify the date on which the Perl Package was installed. A single instance should be present.
INSTROOTChild of PACKAGE, used to specify the root directory that the Perl Package was installed into. A single instance should be present.
INSTPACKLISTChild of PACKAGE, used to specify a reference to the packlist for this Perl Package; a file containing a list of all of the files which were installed. A single instance should be present.
INSTPPDChild of PACKAGE, used to hold a copy of the PPD from which Perl Packages were installed. Multiple instances are valid.
DOCUMENT TYPE DEFINITIONThe DTD for PPMConfig documents is available from the ActiveState website and the latest version can be found at: http://www.ActiveState.com/PPM/DTD/ppmconfig.dtd This revision of the
<!ELEMENT PPMCONFIG (PPMVER | PLATFORM | REPOSITORY | OPTIONS |
PPMPRECIOUS | PACKAGE)*>
<!ELEMENT PPMVER (#PCDATA)>
<!ELEMENT PLATFORM EMPTY>
<!ATTLIST PLATFORM OSVALUE CDATA #REQUIRED
OSVERSION CDATA #REQUIRED
CPU CDATA #REQUIRED
LANGUAGE CDATA #IMPLIED>
<!ELEMENT REPOSITORY EMPTY>
<!ATTLIST REPOSITORY NAME CDATA #REQUIRED
LOCATION CDATA #REQUIRED
USERNAME CDATA #IMPLIED
PASSWORD CDATA #IMPLIED
SUMMARYFILE CDATA #IMPLIED>
<!ELEMENT OPTIONS EMPTY>
<!ATTLIST OPTIONS IGNORECASE CDATA #REQUIRED
CLEAN CDATA #REQUIRED
CONFIRM CDATA #REQUIRED
FORCEINSTALL CDATA #REQUIRED
ROOT CDATA #REQUIRED
BUILDDIR CDATA #REQUIRED
MORE CDATA #REQUIRED
TRACE CDATA #IMPLIED
TRACEFILE CDATA #IMPLIED>
<!ELEMENT PPMPRECIOUS (#PCDATA)>
<!ELEMENT PACKAGE (LOCATION | INSTDATE | INSTROOT | INSTPACKLIST |
INSTPPD)*>
<!ATTLIST PACKAGE NAME CDATA #REQUIRED>
<!ELEMENT LOCATION (#PCDATA)> <!ELEMENT INSTDATE (#PCDATA)> <!ELEMENT INSTROOT (#PCDATA)> <!ELEMENT INSTPACKLIST (#PCDATA)> <!ELEMENT INSTPPD (#PCDATA)>
SAMPLE PPMConfig FILEThe following is a sample PPMConfig file. Note that this may not be a current description of this module and is for sample purposes only.
<PPMCONFIG>
<PPMVER>1,0,0,0</PPMVER>
<PLATFORM CPU="x86" OSVALUE="MSWin32" OSVERSION="4,0,0,0" />
<OPTIONS BUILDDIR="/tmp" CLEAN="1" CONFIRM="1" FORCEINSTALL="1"
IGNORECASE="0" MORE="0" ROOT="/usr/local" TRACE="0" TRACEFILE="" />
<REPOSITORY LOCATION="http://www.ActiveState.com/packages"
NAME="ActiveState Package Repository" SUMMARYFILE="package.lst" />
<PPMPRECIOUS>PPM;libnet;Archive-Tar;Compress-Zlib;libwww-perl</PPMPRECIOUS>
<PACKAGE NAME="AtExit">
<LOCATION>g:/packages</LOCATION>
<INSTPACKLIST>c:/perllib/lib/site/MSWin32-x86/auto/AtExit/.packlist</INSTPACKLIST>
<INSTROOT>c:/perllib</INSTROOT>
<INSTDATE>Sun Mar 8 02:56:31 1998</INSTDATE>
<INSTPPD>
<SOFTPKG NAME="AtExit" VERSION="1,02,0,0">
<TITLE>AtExit</TITLE>
<ABSTRACT>Register a subroutine to be invoked at program -exit time.</ABSTRACT>
<AUTHOR>Brad Appleton (Brad_Appleton-GBDA001@email.mot.com)</AUTHOR>
<IMPLEMENTATION>
<CODEBASE HREF="x86/AtExit.tar.gz" />
</IMPLEMENTATION>
</SOFTPKG>
</INSTPPD>
</PACKAGE>
</PPMCONFIG>
KNOWN BUGS/ISSUESElements which are required to be empty (e.g. REPOSITORY) are not enforced as such. Notations above about elements for which ``only one instance'' or ``multiple instances'' are valid are not enforced; this primarily a guideline for generating your own PPD files. Currently, this module creates new classes within it's own namespace for all of the PPD elements which can be contained within the INSTPPD element. A suitable method for importing the entire XML::PPD:: namespace should be found in order to make this cleaner.
AUTHORSGraham TerMarsch <grahamt@ActiveState.com> Murray Nesbitt <murrayn@ActiveState.com> Dick Hardt <dick_hardt@ActiveState.com>
HISTORYv0.1 - Initial release
SEE ALSOthe XML::ValidatingElement manpage, the XML::Parser manpage, the XML::PPD manpage .
|