cpan

How do I tell CPAN.pm to install all modules in a specific directory?

为君一笑 提交于 2019-12-29 06:18:55
问题 I have set makepl_arg [INSTALLDIRS=site PREFIX=~/perl] mbuildpl_arg [--install_base ~/perl] in the CPAN.pm configuration. I had hoped that this would cause modules to get installed in the same place, but I still have to set multiple paths in PERL5LIB: export PERL5LIB=~/perl/share/perl/5.10.0:~/perl/lib/perl5/:~/perl/lib/perl/5.10.0 This has been the case for a long time and I have just lived with it, but I was wondering if anyone knew how to get CPAN.pm to put all modules in the same

automatically install missing modules from CPAN

随声附和 提交于 2019-12-28 07:07:13
问题 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". 回答1: Auto-installing software is the best way to make both end users and sysadmins very angry with you. Forget about this approach. You can simply ship all your dependencies with your application distro, the inc directory is customary. 回答2: Usually this

automatically install missing modules from CPAN

雨燕双飞 提交于 2019-12-28 07:06:25
问题 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". 回答1: Auto-installing software is the best way to make both end users and sysadmins very angry with you. Forget about this approach. You can simply ship all your dependencies with your application distro, the inc directory is customary. 回答2: Usually this

How do I choose a package name for a custom Perl module that does not collide with builtin or CPAN packages names?

元气小坏坏 提交于 2019-12-28 01:55:23
问题 I have read the perldoc on modules, but I don't see a recommendation on naming a package so it won't collide with builtin or CPAN module/package names. In the past, to develop a local Session.pm module, I have created a local directory using my company's name, such as: package Company::Session; ... and Session.pm would be found in directory Company/. But I'm just not a fan of this naming convention. I would rather name the package hierarchy closer to the functionality of the code. But that's

Redhat Linux 6.5 Perl GD CPAN Module yum

天涯浪子 提交于 2019-12-25 12:32:34
问题 when i try to install "GD" (perl -e shell -MCPAN ->(next step) cpan[1]> install GD) on Redhat 6.5 i got the error: -> CPAN.pm: Building L/LD/LDS/GD-2.53.tar.gz UNRECOVERABLE ERROR Could not find gdlib-config in the search path. Please install libgd 2.0.28 or higher. If you want to try to compile anyway, please rerun this script with the option --ignore_missing_gd. Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=site] CPAN: YAML loaded ok (v0.90) LDS/GD-2.53.tar.gz /usr

Redhat Linux 6.5 Perl GD CPAN Module yum

我与影子孤独终老i 提交于 2019-12-25 12:31:05
问题 when i try to install "GD" (perl -e shell -MCPAN ->(next step) cpan[1]> install GD) on Redhat 6.5 i got the error: -> CPAN.pm: Building L/LD/LDS/GD-2.53.tar.gz UNRECOVERABLE ERROR Could not find gdlib-config in the search path. Please install libgd 2.0.28 or higher. If you want to try to compile anyway, please rerun this script with the option --ignore_missing_gd. Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=site] CPAN: YAML loaded ok (v0.90) LDS/GD-2.53.tar.gz /usr

Error while using cpan command line

空扰寡人 提交于 2019-12-25 09:29:13
问题 I am getting the below errors while using cpan command line: Reading 'C:\Perl64\cpan\sources\modules\02packages.details.txt.gz' Warning: Your C:\Perl64\cpan\sources\modules\02packages.details.txt.gz does not contain a Line-Count header. Please check the validity of the index file by comparing it to more than one CPAN mirror. I'll continue but problems seem likely to happen. CPAN: Time::HiRes loaded ok (v1.9741) Warning: Your C:\Perl64\cpan\sources\modules\02packages.details.txt.gz does not

Parse::ABNF perl usage [closed]

柔情痞子 提交于 2019-12-25 02:08:47
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . I need to parse the SIP headers (grammar in ABNF format) and verify if my Header strings are ok or not. (Example: check strings like "Accept: application/sdp,application/3gpp-imp+xml" to provide testcase pass/fail). Currently I am trying to use perl Parse::ABNF. Now I am not able

how do I link PerlIO Perl package without “installing it”

天涯浪子 提交于 2019-12-24 22:15:01
问题 I'm trying to add the PerlIO::eol package as part of my project without installing it, this way all dependencies can be packaged with my script without having to reinstall them on each machine. How can I do it for PerlIO::eol I don't understand the structure and where the important files are 回答1: Create a subdirectory inc and move an unpacked PerlIO-eol distro there. Then, use something like this in your project's Build.PL : use Config qw(%config); use Module::Build qw(); my $build = Module:

install CPAN module

柔情痞子 提交于 2019-12-24 21:19:32
问题 I have a problem when i want to install perl module I make " cpan" to install cpan , but i get this " Terminal does not support AddHistory. Your configuration suggests that CPAN.pm should use a working directory of /home/cyrine/.cpan Unfortunately we could not create the lock file /home/cyrine/.cpan/.lock due to permission problems. Please make sure that the configuration variable $CPAN::Config->{cpan_home} points to a directory where you can write a .lock file. You can set this variable in