perl-module

Installing Perl modules to a specific location

拈花ヽ惹草 提交于 2019-12-20 02:49:06
问题 I have several Linux machines that run Perl programs and other programs and tools. I want to keep all tools between machines synchronized, so I have shared the /usr/local directory between one machine (Main) and the others. Now I would like to keep all my Perl modules and their dependencies synchronized as well in /usr/local/<path to modules> . I have found the local::lib module, but that is intended to install modules to your home directory. How can I set up CPAN (or CPAN alternatives) to

How do I install Perl libraries in Cygwin?

試著忘記壹切 提交于 2019-12-18 10:22:08
问题 I'm a C/C++/Java/Unix geek by trade, but now I have to write a Perl program in Windows. So I've got Cygwin, Eclipse with EPIC installed, and simple test programs run. I do not have a Unix machine available to me that I can run Eclipse on. But I need to use Net::TCP::Server and I can't figure out how to install it. It doesn't appear to be part of the Cygwin Perl install, and I don't want to spend 5 days learning the world of Perl and CPAN and Perl configuration. I just want to write my program

Which framework should I use to write modules? [closed]

爷,独闯天下 提交于 2019-12-17 10:19:29
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 4 years ago . What's the best framework for writing modules -- ExtUtils::MakeMaker (h2xs) or Module::Build? 回答1: NOTE This advice is out of date. Module::Build has been removed from the Perl core but lives on as a CPAN module. The pros and cons still stand, and my opinions about MakeMaker

Which framework should I use to write modules? [closed]

偶尔善良 提交于 2019-12-17 10:18:10
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 4 years ago . What's the best framework for writing modules -- ExtUtils::MakeMaker (h2xs) or Module::Build? 回答1: NOTE This advice is out of date. Module::Build has been removed from the Perl core but lives on as a CPAN module. The pros and cons still stand, and my opinions about MakeMaker

How is Perl's @INC constructed? (aka What are all the ways of affecting where Perl modules are searched for?)

て烟熏妆下的殇ゞ 提交于 2019-12-16 20:03:53
问题 What are all the ways of affecting where Perl modules are searched for? or, How is Perl's @INC constructed ? As we know, Perl uses @INC array containing directory names to determine where to search for Perl module files. There does not seem to be a comprehensive "@INC" FAQ-type post on StackOverflow, so this question is intended as one. 回答1: We will look at how the contents of this array are constructed and can be manipulated to affect where the Perl interpreter will find the module files.

What is the difference between <stdin> and <STDIN>?

佐手、 提交于 2019-12-14 03:43:21
问题 When I use <stdin> in Perl module ( *.pm ) files it's not reading input from the keyboard, but when I use <STDIN> in the same place it works fine. Why is it not getting input when I use <stdin> ? 回答1: STDIN is the documented filehandle. There exists stdin as well, which is aliased to STDIN , but it only works in the main:: package: main::stdin is the same as main::STDIN (as documented in perlop - Perl operators and precedence). In a package, therefore, package My::Package; sub xx { print

Cannot force install GD with cpan/cpanm

半城伤御伤魂 提交于 2019-12-14 02:38:47
问题 I have looked and seen similar issues posted but am unable to get GD working. the following error arises with libgd and libpng installed ... clang -c -I/usr/local/include -arch i386 -arch x86_64 -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -I/usr/local/include -Wformat=0 -Os -DVERSION=\"2.50\" -DXS_VERSION=\"2.50\" "-I/System/Library/Perl/5.12/darwin-thread-multi-2level/CORE" -DHAVE_FT -DHAVE_GIF -DHAVE_ANIMGIF -DVERSION_33 -DHAVE_UNCLOSEDPOLY -DHAVE_FTCIRCLE GD.c

how to give user name and password as a input in scp module?

拟墨画扇 提交于 2019-12-13 19:06:18
问题 I am trying to copy a files from one host to another host using : Net::SCP::Expect here is my program. use strict; use Net::SCP::Expect; print "enter user name\n"; my $username = <>; print "enter password\n"; my $pass = <>; print "enter host name\n"; my $host = <>; my $src_path = "/"; my $dst_path = "/"; my $scpe = Net::SCP::Expect->new(user=>$username, password=>$pass, auto_yes=> '1'); $scpe->scp($host.":".$src_path, $dst_path); I am getting error as bad password.how to give user name and

read xml file without any XML module

霸气de小男生 提交于 2019-12-13 10:28:37
问题 I am trying to read a XML form using Perl but I can not use any XML modules like XML::Simple, XML::Parse. It is a simple XML form which has some basic information and a MS Doc attachment. I want to read this XML and download this attached Doc file then print the XML information in the screen. But I don't know any way how I can do this without a XML module , I heard that XML file can be parse using Data::Dumper but I am not familiar with this module, so not getting how to do this. Could you

Perl module, inhereting from DBI , “Can't call method 'prepare'” error [duplicate]

主宰稳场 提交于 2019-12-13 09:33:38
问题 This question already has an answer here : Closed 7 years ago . Possible Duplicate: Perl + POO and “Can't call method ”prepare" I learned poo and i got to play with perl, create this module but when I call the segudno method I skip the following error 'Use of uninitialized value $database in concatenation ( .) ... ' Followed by 'Can't call method 'prepare' mm i don't really understand, any suggestions? #!/usr/bin/perl use warnings; use strict; use DBI; use DBD::mysql; package MysqlTest; sub