App-aptperl
view release on metacpan or search on metacpan
bin/apt-perl view on Meta::CPAN
my %required;
sub required_modules {
my ($module) = @_;
return if exists $required{$module};
$required{$module}++;
$mcpan ||= MetaCPAN::API->new(
ua => HTTP::Tiny::Mech->new(
mechua => WWW::Mechanize::Cached->new(
cache => CHI->new(
driver => 'File',
root_dir => '/tmp/metacpan-cache',
),
),
),
);
warn "$module\n" if $option{verbose} > 1;
my $module_details = $mcpan->module($module);
my $dist_details = $mcpan->release( distribution => $module_details->{distribution} );
return wantarray ? ( $module_details->{distribution}, $dist_details->{dependency} ) : $dist_details->{dependency};
}
__DATA__
=head1 NAME
apt-perl - Installs perl dependencies from apt (if possible) otherwise uses cpanm.
=head1 VERSION
This documentation refers to apt-perl version 0.0.4
=head1 SYNOPSIS
apt-perl [option] (module|dist|file) ...
OPTIONS:
-t --test Just show what would be installed don't actually install
-v --verbose Show more detailed option
--version Prints the version information
--help Prints this help information
--man Prints the full documentation for apt-perl
=head1 DESCRIPTION
=head1 SUBROUTINES/METHODS
=head1 DIAGNOSTICS
=head1 CONFIGURATION AND ENVIRONMENT
=head1 DEPENDENCIES
=head1 INCOMPATIBILITIES
=head1 BUGS AND LIMITATIONS
There are no known bugs in this module.
Please report problems to Ivan Wills (ivan.wills@gmail.com).
Patches are welcome.
=head1 AUTHOR
Ivan Wills - (ivan.wills@gmail.com)
=head1 LICENSE AND COPYRIGHT
Copyright (c) 2013 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW, Australia 2077)
All rights reserved.
This module is free software; you can redistribute it and/or modify it under
the same terms as Perl itself. See L<perlartistic>. This program is
distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
=cut
( run in 2.316 seconds using v1.01-cache-2.11-cpan-75ffa21a3d4 )