如何开始为CPAN编写模块? [英] How do I get started writing a module for CPAN?

查看:65
本文介绍了如何开始为CPAN编写模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在,我为图书馆使用了自己的本地测试工具/目录结构/支持文档结构/分发工具.但是,请阅读博客文章编写代码就像在CPAN上进行一样,听起来像是个好主意.然后发生在我身上,我真的不确定该怎么做.

Right now, I have my own homegrown testing harness/directory structure/support doc strucure/distribution tools for my libraries. However, reading the blog post Write your code like it's going on CPAN, it sounded like a good idea. Then it occurred to me, I'm really not sure how to do that.

开始使用类似CPAN的结构制作自己的Perl软件包有哪些好的资源?

What are some good resources to get started making your own Perl packages in the CPAN-like structure?

推荐答案

我通常从命令行工具,它将从模板创建一个新的发行版,包括所有必需的文件和at/目录,依此类推.还将生成Makefile.PL(使用ExtUtils :: MakeMaker)或Build.PL(使用Module :: Build.)

I usually start with Module::Starter. It comes with a pretty simple command-line tool that will create a new distribution from a template, including all the necessary files and a t/ directory, and so on. It will also produce either a Makefile.PL (using ExtUtils::MakeMaker) or a Build.PL (using Module::Build.)

它还会在其中放置一个空的.pm文件,并在其中放置用于POD等的模板.

It also places an empty .pm file there with templates in place for your POD and such.

这篇关于如何开始为CPAN编写模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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