自动从 CPAN 安装缺少的模块 [英] automatically install missing modules from CPAN

查看:24
本文介绍了自动从 CPAN 安装缺少的模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我想分发一个 Perl 脚本,那么轻松安装用户系统上缺少的任何必需模块的最佳方法是什么?如果 Perl 缺失或太旧",甚至可以安装/升级 Perl 本身,则额外加分.

If I want to distribute a Perl script, what is the best way to painlessly install any required modules that are missing on the user's system? Extra credit if there is a way to even install/upgrade Perl itself if it is missing or "too old".

推荐答案

自动安装软件是让最终用户和系统管理员对您非常生气的最佳方式.忘记这种方法吧.

Auto-installing software is the best way to make both end users and sysadmins very angry with you. Forget about this approach.

您可以简单地随应用程序发行版一起提供所有依赖项,inc 目录是惯用的.

You can simply ship all your dependencies with your application distro, the inc directory is customary.

这篇关于自动从 CPAN 安装缺少的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆