Parse::Debian::Packages(3pm)

Parse::Debian::Packages3pm

Parse the data from a debian packages.gz

Usage

 use YAML;
 use IO::File;
 use Parse::Debian::Packages;
 my $fh = IO::File->new("Packages");
 my $parser = Parse::Debian::Packages->new( $fh );
 while (my %package = $parser->next) {
     print Dump \%package;
 }

Overview

This module parses the Packages files used by the debian package management tools.

It presents itself as an iterator. Each call of the ->next method will return the next package found in the file.

For laziness, we take a filehandle in to the constructor. Please open the file for us.

Methods

new( $filehandle )

next

Iterate to the next package in the file, returns either a hash containing a package description, or false at end of file.

as_hash( $filehandle )

Return all the packages from a filehandle as a hash of hashes.

Releases

11 releases since Debian 3.1 (Sarge); the text changed 5 times.

  1. 3.1–5.0
  2. 6.0
  3. 7
  4. 8–10
  5. 11
  6. 12–13

Author

Richard Clamp <[email protected]> with as_hash implementation by Thomas Klausner.

From libparse-debian-packages-perl 0.03-5 in Debian 13 (Trixie). Parsed by carta from the page's man source.