CPAN module prereqs

对着背影说爱祢 提交于 2020-01-11 09:19:49

问题


I plan on uploading a module to CPAN, shortly. This is the first module I've contributed. I've got the module to what I'd consider a "beta" stage. I'm using ExtUtils::MakeMaker to generate a Makefile through Makefile.PL (I've pasted the contents of it below). The Makefile.PL script has all the prereq modules listed. I'm wondering at which point in the installation process, the prereq modules are installed if they're not present? I'm wondering because I ran Makefile.PL followed by make then make install in a separate environment that's missing some of the prereq modules. However, they were not installed? I was under the impression they would be but maybe im missing something? I'm looking for someone to provide some clarity. Thanks in advance~

Makefile.PL

#!/usr/bin/env perl 

use strict;
use warnings;
use ExtUtils::MakeMaker;

WriteMakefile(
    NAME      => 'Imgur',
    VERSION   => '0.01',
    PREREQ_PM => {
        'JSON'                      => 2.90,
        'LWP::UserAgent'            => 6.05,
        'HTTP::Request::Common'     => 6.04,
        'Data::Dumper'              => 2.154,
        'DateTime::Format::ISO8601' => 0.08,
        'Config::IniFiles'          => 2.86,
        'Scalar::Util'              => 1.42,
        'Class::Std::Utils'         => 0.0.3,
        'MIME::Base64'              => 3.15,
        'File::Slurp'               => 9999.19
    }
);

回答1:


The Makefile.PL doesn't install prerequisites; it just complains if they're not installed. It's the CPAN client's job to install prerequisites.

Note: Module::Install has an auto_install feature that does this, but the general consensus seems to be that using it is a bad idea.



来源:https://stackoverflow.com/questions/30765522/cpan-module-prereqs

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!