App-depakable

 view release on metacpan or  search on metacpan

bin/module-depakable  view on Meta::CPAN

our $VERSION = '0.002'; # VERSION

use 5.010001;
use strict;
use warnings;

use Perinci::CmdLine::Any;

Perinci::CmdLine::Any->new(
    url => "/Module/Depakable/module_depakable",
    program_name => "module-depakable",
)->run;

# ABSTRACT: Check whether a module (or modules) is (are) depakable
# PODNAME: module-depakable

__END__

=pod

=encoding UTF-8

=head1 NAME

module-depakable - Check whether a module (or modules) is (are) depakable

=head1 VERSION

This document describes version 0.002 of module-depakable (from Perl distribution App-depakable), released on 2016-09-26.

=head1 SYNOPSIS

Usage:

 % module-depakable [options] <modules> ...

Examples:

 % module-depakable Data::Sah WWW::PAUSE::Simple
=head1 DESCRIPTION

This routine tries to determine whether the module(s) you specify, when use-d by
a script, won't impair the ability to depak the script so that the script can
run with requiring only core perl modules installed. The word "depak-able"
(depak) comes from the name of the application that can pack a script using
fatpack/datapack technique.

Let's start with the aforementioned goal: making a script run with only
requiring core perl modules installed. This is a pretty reasonable goal for a
common use-case: deploying a Perl application to a fresh perl installation. All
the non-core modules that the script might use are packed along inside the
script using fatpack (put inside a hash variable) or datapack (put in the DATA
section) technique. But XS modules cannot be packed using this technique. And
therefore, a module that requires non-core XS modules (either directly or
indirectly) also cannot be used.

So in other words, this routine checks that a module is PP (pure-perl) I<and> all
of its (direct and indirect) dependencies are PP or core.

To check whether a module is PP/XS, C<Module::XSOrPP> is used and this requires
that the module is installed because C<Module::XSOrPP> guesses by analyzing the
module's source code.

To list all direct and indirect dependencies of a module, C<lcpan> is used, so
that application must be installed and run first to download and index a local
CPAN/CPAN-like repository.

=head1 OPTIONS

C<*> marks required options.

=head2 Configuration options

=over

=item B<--config-path>=I<filename>

Set path to configuration file.

Can be specified multiple times.

=item B<--config-profile>=I<s>

Set configuration profile to use.

=item B<--no-config>

Do not use any configuration file.

=back

=head2 Environment options

=over

=item B<--no-env>

Do not read environment for default options.

=back

=head2 Output options

=over

=item B<--format>=I<s>

Choose output format, e.g. json, text.

Default value:

 undef

=item B<--json>

Set output format to json.

=item B<--naked-res>

When outputing as JSON, strip result envelope.



( run in 2.394 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )