ActivePerl::PPM::Profile - Access to profile data

NAME

ActivePerl::PPM::Profile - Access to profile data

SYNOPSIS

  my $profile = ActivePerl::PPM::Profile->new(<<EOT);
  <PPMPROFILE>
    <ACTIVEPERL VERSION="1004" PERL_VERSION="5.10.0" PPM_VERSION="4.04"/>
    <REPOSITORY NAME="ActiveState Package Repository"
       HREF="http://ppm4.activestate.com/darwin/5.10/1004/package.xml"/>
    <SOFTPKG NAME="Foo-Bar" VERSION="1.0"/>
    <SOFTPKG NAME="HTML-Parser" VERSION="3.65"/>
  </PPMPROFILE>
  EOT

DESCRIPTION

The ActivePerl::PPM::Profile object parse and provide access to XML profile dumps as generated by the ppm profile save command.

The following methods are provided:

$profile = ActivePerl::PPM::Profile->new( $xml )
$profile = ActivePerl::PPM::Profile->new( $filename )

This will parse the given XML document and create the object that wraps the data. The method croaks if it can't parse the document or can't open the file.

$profile->activeperl_version

This returns the build number of the ActivePerl used to create the profile. Example "825".

$profile->perl_version

This returns the perl version number of the ActivePerl used to create the profile. Example "5.8.9".

$profile->ppm_version

This return the version number of PPM that generated the profile. Example "4.05".

$profile->repositories

This returns the list of repositories configured. Each entry is a hash with the keys name, href and enabled. In scalar context returns the number of repositories.

$profile->packages

This returns the list of packages installed. Each entry is a hash with the keys name and version. In scalar context returns the number of packages.

SEE ALSO

ppm