/usr/lib/perl5/AptPkg/Policy.pm is in libapt-pkg-perl 0.1.29build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | package AptPkg::Policy;
require 5.005_62;
use strict;
use warnings;
use AptPkg;
our $VERSION = 1.1;
sub priority
{
my ($self, $arg) = @_;
my $xs = $$self;
$xs->GetPriority($arg->_xs);
}
sub match
{
my ($self, $pkg) = @_;
my $xs = $$self;
my $ver = $xs->GetMatch($pkg->_xs) or return;
AptPkg::Cache::Version->new($ver);
}
sub candidate
{
my ($self, $pkg) = @_;
my $xs = $$self;
my $ver = $xs->GetCandidateVer($pkg->_xs) or return;
AptPkg::Cache::Version->new($ver);
}
1;
__END__
=head1 NAME
AptPkg::Policy - APT package version policy class
=head1 SYNOPSIS
use AptPkg::Policy;
=head1 DESCRIPTION
The AptPkg::Policy module provides an interface to B<APT>'s package
version policy.
=head2 AptPkg::Policy
The AptPkg::Policy package implements the B<APT> pkgPolicy class.
An instance of the AptPkg::Policy class may be fetched using the
C<policy> method from an AptPkg::Cache object.
The following methods are implemented:
=over 4
=item priority(I<PKG>|I<FILE>)
Return the pin priority for the given I<PKG> (AptPkg::Cache::Package)
or I<FILE> (AptPkg::Cache::PkgFile) object.
=item match(I<PKG>)
Find the pinned version of I<PKG>. Returns an AptPkg::Cache::Version
object.
=item candidate(I<PKG>)
Returns the installation candidate version for I<PKG>.
=back
=head1 SEE ALSO
AptPkg::Cache(3pm), AptPkg(3pm).
=head1 AUTHOR
Brendan O'Dea <bod@debian.org>
=cut
|