PPM::Make::RepositorySummary - generate summary files for a ppm repository
use PPM::Make::RepositorySummary; my $rep = '/path/to/ppms'; my $obj = PPM::Make::RepositorySummary->new(rep => $rep); $obj->summary();
This module may be used to generate various summary files as used by ActiveState's ppm system. It searches a given directory for ppd files, which are of the form
<?xml version="1.0" encoding="UTF-8"?> <SOFTPKG NAME="Archive-Tar" VERSION="1,29,0,0"> <TITLE>Archive-Tar</TITLE> <ABSTRACT>Manipulates TAR archives</ABSTRACT> <AUTHOR>Jos Boumans <kane[at]cpan.org></AUTHOR> <IMPLEMENTATION> <DEPENDENCY NAME="IO-Zlib" VERSION="1,01,0,0" /> <OS NAME="MSWin32" /> <ARCHITECTURE NAME="MSWin32-x86-multi-thread-5.8" /> <CODEBASE HREF="Archive-Tar.tar.gz" /> </IMPLEMENTATION> </SOFTPKG>
and generates four types of files summarizing the information found in all ppd files found:
<?xml version="1.0" encoding="UTF-8"?> <REPOSITORYSUMMARY> <SOFTPKG NAME="Archive-Tar" VERSION="1,29,0,0"> <TITLE>Archive-Tar</TITLE> <ABSTRACT>Manipulates TAR archives</ABSTRACT> <AUTHOR>Jos Boumans <kane[at]cpan.org></AUTHOR> </SOFTPKG> ... </REPOSITORYSUMMARY>
<?xml version="1.0" encoding="UTF-8"?> <REPOSITORYSUMMARY> <SOFTPKG NAME="Archive-Tar" VERSION="1,29,0,0"> <TITLE>Archive-Tar</TITLE> <ABSTRACT>Manipulates TAR archives</ABSTRACT> <AUTHOR>Jos Boumans <kane[at]cpan.org></AUTHOR> <IMPLEMENTATION> <ARCHITECTURE NAME="MSWin32-x86-multi-thread-5.8" /> </IMPLEMENTATION> </SOFTPKG> ... </REPOSITORYSUMMARY>
<?xml version="1.0" encoding="UTF-8"?> <REPOSITORYSUMMARY> <SOFTPKG NAME="Archive-Tar" VERSION="1,29,0,0"> <TITLE>Archive-Tar</TITLE> <ABSTRACT>Manipulates TAR archives</ABSTRACT> <AUTHOR>Jos Boumans <kane[at]cpan.org></AUTHOR> <IMPLEMENTATION> <DEPENDENCY NAME="IO-Zlib" VERSION="1,01,0,0" /> <OS NAME="MSWin32" /> <ARCHITECTURE NAME="MSWin32-x86-multi-thread-5.8" /> <CODEBASE HREF="Archive-Tar.tar.gz" /> </IMPLEMENTATION> </SOFTPKG> ... </REPOSITORYSUMMARY>
<?xml version="1.0" encoding="UTF-8"?> <REPOSITORYSUMMARY ARCHITECTURE="MSWin32-x86-multi-thread-5.8"> <SOFTPKG NAME="Archive-Tar" VERSION="1.29"> <ABSTRACT>Manipulates TAR archives</ABSTRACT> <AUTHOR>Jos Boumans <kane[at]cpan.org></AUTHOR> <IMPLEMENTATION> <ARCHITECTURE NAME="MSWin32-x86-multi-thread-5.8" /> <CODEBASE HREF="Archive-Tar.tar.gz" /> </IMPLEMENTATION> <REQUIRE NAME="IO-Zlib" VERSION="1.01" /> <PROVIDE NAME="Archive::Tar" VERSION="1.29" /> <PROVIDE NAME="Archive::Tar::File" VERSION="1.21" /> </SOFTPKG> ... </REPOSITORYSUMMARY>
If multiple <IMPLEMETATION> sections are present in the ppd file, all will be included in the corresponding summary files.
Options accepted by the new constructor include
This option, which is required, specifies the path to where the ppd files are found. The summary files will be written in this directory.
If this option is specified, the package.xml file (which contains some extensions used by ppm4) will not be generated.
If this option is given, it will be used as the ARCHITECTURE attribute of the REPOSITORYSUMMARY element of package.xml.
This program is copyright, 2006, by Randy Kobes <r.kobes.uwinnipeg.ca>. It is distributed under the same terms as Perl itself.
PPM and PPM::Make
To install PPM::Make, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PPM::Make
CPAN shell
perl -MCPAN -e shell install PPM::Make
For more information on module installation, please visit the detailed CPAN module installation guide.