cpan

How do I install a module? Strawberry Perl issues

こ雲淡風輕ζ 提交于 2019-11-27 13:47:18
问题 I am trying to install a Perl module within Strawberry Perl on Windows 7. I'm running the below command and am getting a slew of messages I don't understand. It looks like I am getting 500 errors, as though the page isn't reachable. However, when I point the mirrors in my browser I have no problem accessing the FTP directories. I have little Perl experience on Linux, and none on Windows. I tried manually adding a mirror to the urllist, and I don't think that helped. C:\Program Files> cpan

I installed a module successfully with CPAN, but perl can't find it. Why?

限于喜欢 提交于 2019-11-27 13:40:09
I installed a CPAN module like this: cpan Acme According to the output, the installation was successful: Running install for module 'Acme' ... All tests successful. Files=2, Tests=3, 0 wallclock secs ( 0.02 usr 0.00 sys + 0.04 cusr 0.00 csys = 0.06 CPU) Result: PASS INGY/Acme-1.11111111111.tar.gz /usr/bin/make test -- OK Running make install Manifying 1 pod document Installing /home/foo/perl5/lib/perl5/Acme.pod Installing /home/foo/perl5/lib/perl5/Acme.pm Installing /home/foo/perl5/man/man3/Acme.3pm Appending installation info to /home/foo/perl5/lib/perl5/x86_64-linux-thread-multi/perllocal

Can a Perl script install its own CPAN dependencies?

家住魔仙堡 提交于 2019-11-27 13:15:19
I have a Perl script that has two dependencies that exist in CPAN. What I'd like to do is have the script itself prompt the user to install the necessary dependencies so the script will run properly. If the user needs to enter in some kind of authentication to install the dependencies that's fine: what I'm trying to avoid is the following workflow: Run script -> Watch it fail -> Scour CPAN aimlessly -> Lynch the script writer Instead I'm hoping for something like: Run script -> Auto-download script dependencies (authenticating as necessary) -> Script succeeds -> Buy the script writer a beer

Install Perl modules with lots of dependencies on a machine without CPAN network access

时光怂恿深爱的人放手 提交于 2019-11-27 12:28:33
问题 I am trying to install the DateTime machine on a Linux server. Unfortunately, this Linux server has some restricted network access policy that prevents me from using the CPAN shell directly to download content, or installing cpanminus. Changing the access policy is beyond my control, so I am looking for a workaround. I also don't have root access to this Linux server. I can, however, download anything to my work's Window machine, and upload to a file share on this server. So I started to pull

How do I get started writing a module for CPAN?

有些话、适合烂在心里 提交于 2019-11-27 10:09:10
问题 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? 回答1: I usually start with Module::Starter. It comes with a pretty simple command-line tool that will

How can I de-install a Perl module installed via `cpan`?

江枫思渺然 提交于 2019-11-27 09:56:07
问题 I am using Perl running in user space (not installed via root) and installing modules via the command-line cpan . I would like to know if there is a simple way to remove a module without having to do a lot of work deleting individual files. I searched for this question on the internet and found some answers, but the answers I've found seem to either discuss using the Perl package manager (specific for Microsoft Windows), otherwise operating-system specific (BSDpan), suggesting using cpanplus

What are some good Perl debugging methods?

杀马特。学长 韩版系。学妹 提交于 2019-11-27 09:46:42
问题 Are there any other ways for debugging Perl apart from Data::Dumper and perl -d ? 回答1: 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

How to make “use My::defaults” with modern perl & utf8 defaults?

流过昼夜 提交于 2019-11-27 09:04:02
I want make a module for my own "default use", e.g.: use My::perldefs; with the following content (mostly based on tchrist's post.) use 5.014; use strict; use features qw(switch say state); no warnings; use warnings qw(FATAL closed threads internal debugging pack substr malloc unopened portable prototype inplace io pipe unpack regexp deprecated exiting glob digit printf utf8 layer reserved parenthesis taint closure semicolon); no warnings qw(exec newline); use utf8; use open qw(:std :utf8); use charnames qw(:full); use feature qw(unicode_strings); use Encode qw(encode decode); use Unicode:

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

老子叫甜甜 提交于 2019-11-27 08:59:26
问题 How do I update all my CPAN modules to their latest versions? 回答1: 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

Perl GD module won't install -

杀马特。学长 韩版系。学妹 提交于 2019-11-27 07:56:15
问题 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