ALPM
view release on metacpan or search on metacpan
lib/ALPM/Package.pod view on Meta::CPAN
=head1 NAME
ALPM::Package - libalpm packages of files, with dependencies, etc.
=head1 SYNOPSIS
use ALPM::Conf qw(/etc/pacman.conf);
my $perlpkg = $alpm->localdb->find('perl');
## All package methods are accessors.
my $name = $perlpkg->name();
print "$name rocks!\n";
## Here is an ugly trick. Please forgive me.
print "@{[$perlpkg->name]} rocks!\n";
## Dependencies are arrayrefs of hashrefs (AoH):
print "$name depends on:\n";
for my $deps (@{$perlpkg->depends}){
print "\t@{$dep}{'name', 'mod', 'version'}\n";
}
## File lists are also arrayrefs of hashrefs (AoH):
print "$name owns files:\n";
for my $f (@{$perlpkg->files}){
printf "\t%s %o %d\n", $f->{'name'}, $f->{'mode'}, $f->{'size'};
}
## Others lists are arrayrefs of scalars:
print "$name is licensed under: @{$perlpkg->licenses}";
=head1 DESCRIPTION
This class is a wrapper for all of the C<alpm_pkg_...> C library functions
of libalpm. You retrieve the package from the database and you can then
access its information.
=head1 ACCESSORS
The accessors are named almost exactly the same as the C<alpm_pkg_get...>
functions. I have removed the get_ prefix on the accessors. This is
because you can't really I<set> anything so you should know it's a get
anyways.
=over
=item * filename
=item * name
=item * version
=item * desc
=item * url
=item * builddate
=item * installdate
=item * packager
=item * arch
=item * size
=item * isize
=item * reason
=item * licenses
=item * groups
=item * depends
=item * optdepends
=item * conflicts
=item * provides
=item * deltas
=item * replaces
=item * files
=item * backup
=item * has_scriptlet
=item * download_size
=item * changelog
( run in 1.350 second using v1.01-cache-2.11-cpan-39bf76dae61 )