cpan

How do I automate CPAN configuration?

*爱你&永不变心* 提交于 2019-11-28 19:39:04
问题 The first time you run cpan from the command line, you are prompted for answers to various questions. How do you automate cpan and install modules non-interactively from the beginning? 回答1: Since it hasn't been mentioned yet, cpanminus is a zero-conf cpan installer. And you can download a self-contained executable if it isn't available for your version control. The cpanm executable is easily installed (as documented in the executable itself) with: curl -L http://cpanmin.us | perl - --self

What is the best Perl module to use for creating a .pdf from scratch?

强颜欢笑 提交于 2019-11-28 17:59:17
There are quite a number of modules on CPAN relating to the creation and manipulation of .pdf files, and I'm hoping this community can save me some time going down blind alleys. I am looking to create .pdf files from scratch, with only simple formatting such as bold/italic and left/right/center justify. Being able to use a template file would nice, from an MVC perspective, but if the best module doesn't support that, I'm ok. I want the best module for my narrow problem set. Edit: let's add the constraint that it does have to be a Perl module, if not a pure-perl solution. Thanks for answers

How do I get started writing a module for CPAN?

吃可爱长大的小学妹 提交于 2019-11-28 17:04:24
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. What are some good resources to get started making your own Perl packages in the CPAN-like structure? 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

What are some good Perl debugging methods?

不想你离开。 提交于 2019-11-28 16:33:30
Are there any other ways for debugging Perl apart from Data::Dumper and perl -d ? Haim Evgi Available tools for debugging There are several tools available in Perl for debugging and similar tasks. Built-in command line debugger. perl -d yourcode.pl Devel::ptkdb Perl/Tk based graphical debugger by Andrew E. Page. Regex Coach This a free tool running both on Linux and Windows written in Lisp . Source code is not available. Rx: A Regex Debugger for Perl The Perl Regex debugger and an article about it written by Mark Jason Dominus. A GUI for the Perl Debugger Chas. Owens There are lots of things

How do I install CPAN modules while using perlbrew?

狂风中的少年 提交于 2019-11-28 16:26:30
问题 I have started using perlbrew and installed perl-5.12.2. I understand I need to re-install my CPAN modules, so I switched to my new Perl version ( perlbrew switch perl-5.12.2 and hash -r ), verified the switch was successful ( perl -v ) then tried installing some module ( File::Copy::Recursive using cpan . However, cpan says `File::Copy::Recursive is up to date (0.38). When I start a Perl script using this module, it shouts Can't locate File/Copy/Recursive.pm in @INC ... (showing many perl-5

How do I find the module dependencies of my Perl script?

筅森魡賤 提交于 2019-11-28 16:19:36
问题 I want another developer to run a Perl script I have written. The script uses many CPAN modules that have to be installed before the script can be run. Is it possible to make the script (or the perl binary) to dump a list of all the missing modules? Perl prints out the missing modules’ names when I attempt to run the script, but this is verbose and does not list all the missing modules at once. I’d like to do something like: $ cpan -i `said-script --list-deps` Or even: $ list-deps said-script

How do I update all my CPAN modules to their latest versions?

妖精的绣舞 提交于 2019-11-28 15:05:34
How do I update all my CPAN modules to their latest versions? draegtun An alternative method to using upgrade from the default CPAN shell is to use cpanminus and cpan-outdated . These are so easy and nimble to use that I hardly ever go back to CPAN shell. To upgrade all of your modules in one go, the command is: cpan-outdated -p | cpanm I recommend you install cpanminus like the docs describe: curl -L https://cpanmin.us | perl - App::cpanminus And then install cpan-outdated along with all other CPAN modules using cpanm : cpanm App::cpanoutdated BTW: If you are using perlbrew then you will need

Perl GD module won't install -

会有一股神秘感。 提交于 2019-11-28 13:56:54
I'm trying to figure out why I can't get the GD perl module to install on my Debian 7 server. Here is how I installed the core stuff: sudo apt-get install libgd-gd2-perl Then running the -MCPAN to install, I get: root@myserver:~# sudo perl -MCPAN -e 'install GD' Going to read '/root/.cpan/Metadata' Database was generated on Sun, 19 Jul 2015 21:41:02 GMT Running install for module 'GD' Running make for L/LD/LDS/GD-2.56.tar.gz Checksum for /root/.cpan/sources/authors/id/L/LD/LDS/GD-2.56.tar.gz ok CPAN.pm: Going to build L/LD/LDS/GD-2.56.tar.gz Configuring for libgd version 2.0.36. Checking for

CPAN installing Net::Pcap and Packet module failed due to lpcap

浪子不回头ぞ 提交于 2019-11-28 13:13:32
问题 Recently, I tried to install perl module Net::Packet and Net::Pcap through cpan but it complained that it cannot find pcap library. So I was searching if cpan would accept external lib/include directory when installing module, but no luck til now. looking for -lpcap... no - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - You appear to lack the pcap(3) library. If it is installed in a non-standard locatio n, please try setting the LIBS and INC values on the command line. Or get the

Building a local CPAN repository

夙愿已清 提交于 2019-11-28 09:14:02
问题 I wonder if there are any options in Perl to build a local CPAN repository including the modules I want and then redistribute it with Perl distribution and then do not need to access CPAN at all. If yes, could some me show an example? I looked on CPAN and found a mincpan but it seems that minicpan bring all the mirror of CPAN. If it's possible to bring only a specific subset of modules using minicpan and in case I have a repository is it possible to copy it to another OS with the same type