Debian::Packages - An interface to a Debian Packages file


Debian-Packages documentation Contained in the Debian-Packages distribution.

Index


Code Index:

NAME

Top

Debian::Packages - An interface to a Debian Packages file

VERSION

Top

Version 0.03

SYNOPSIS

Top

use Debian::Packages;

# create object and pass a Packages file my $packages_file = DebianPackages->new(filename => '/var/www/apt/dists/sid/main/binary-i386/Packages'); my @packages_array = $packages_file->read; print "First found package is $packages_array[0]\n";

read

Read our Packages file, place into an array of newlines.

DESCRIPTION

Top

DebianPackages is an interface to a Debian Packages file. The Debian Packages file is a list of packages included in a Debian, or Debian based, distribution. This is the file used by APT and other tools to query and install packages on a Debian system. The Packages file is usually created by one of the tools that manages a debian package repository, like reprepro or dak for example. It has limited use for end users since apt and aptitude are better and more complete tools.

AUTHOR

Top

Jeremiah C. Foster, <jeremiah@jeremiahfoster.com>

COPYRIGHT & LICENSE

Top

SEE ALSO

Top

Parse::Debian::Packages (Does roughly the same thing, but is unmaintained.)_


Debian-Packages documentation Contained in the Debian-Packages distribution.
#!/usr/bin/perl

package Debian::Packages;
use Moose;

our $VERSION = '0.03';

has 'file' => ( is => 'ro', isa => 'Str', default => 0 );

sub read {
  use Perl6::Slurp;
  my ($self) = @_;
  slurp $self->{filename}, {irs => qr/\n\n/xms};
}

1;  # End of Debian::Packages