/usr/share/perl5/Carton/Dist.pm is in carton 1.0.12-1.
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 | package Carton::Dist;
use Moo;
use warnings NONFATAL => 'all';
use CPAN::Meta;
has name => (is => 'ro');
has pathname => (is => 'rw');
has provides => (is => 'rw', default => sub { +{} });
has requirements => (is => 'rw', lazy => 1, builder => 1,
handles => [ qw(add_string_requirement required_modules requirements_for_module) ]);
sub is_core { 0 }
sub distfile {
my $self = shift;
$self->pathname;
}
sub _build_requirements {
CPAN::Meta::Requirements->new;
}
sub provides_module {
my($self, $module) = @_;
exists $self->provides->{$module};
}
sub version_for {
my($self, $module) = @_;
$self->provides->{$module}{version};
}
1;
|