App-DistUtils
view release on metacpan or search on metacpan
script/list-dist-contents view on Meta::CPAN
#!perl
use 5.010;
use strict;
use warnings;
use App::DistUtils;
use Perinci::CmdLine::Any;
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2023-05-20'; # DATE
our $DIST = 'App-DistUtils'; # DIST
our $VERSION = '0.154'; # VERSION
our %SPEC;
$SPEC{list_dist_contents} = {
v => 1.1,
summary => 'List contents of an installed Perl distribution',
args => {
%App::DistUtils::dist_arg_single,
},
};
sub list_dist_contents {
require Dist::Util;
my %args = @_;
my $dist = $args{dist};
$dist =~ s/-/::/g;
my $packlist = Dist::Util::packlist_for($dist);
return [404, "Can't find .packlist for $dist"] unless $packlist;
[200, "OK", do { local $/; open my($fh), "<", $packlist; ~~<$fh> }];
}
Perinci::CmdLine::Any->new(
url => "/main/list_dist_contents",
)->run;
# ABSTRACT: List contents of an installed Perl distribution
# PODNAME: list-dist-contents
__END__
=pod
=encoding UTF-8
=head1 NAME
list-dist-contents - List contents of an installed Perl distribution
=head1 VERSION
This document describes version 0.154 of list-dist-contents (from Perl distribution App-DistUtils), released on 2023-05-20.
=head1 SYNOPSIS
% list-dist-contents Text-ANSITable
=head1 DESCRIPTION
=head1 OPTIONS
C<*> marks required options.
=head2 Main options
=over
=item B<--dist>=I<s>
Distribution name, defaults to "this dist".
See the L<this-dist> utility for how to guess for "this distribution".
Can also be specified as the 1st command-line argument.
=back
=head2 Configuration options
=over
=item B<--config-path>=I<s>, B<-c>
Set path to configuration file.
Can actually be specified multiple times to instruct application to read from
multiple configuration files (and merge them).
( run in 1.833 second using v1.01-cache-2.11-cpan-39bf76dae61 )