perl-module

My Perl module from CPAN won't install, what do I do?

余生颓废 提交于 2019-12-01 17:53:01
问题 This is a canonical question for the above problem, inspired by this answer and this question. Please edit and improve it. I'm trying to install a module from CPAN, using the CPAN/cpanm/CPANPLUS client. However, I'm getting build or test errors when I try to install it. What should I do? 回答1: Does it build at all? The first thing to consider is, is your module building at all? If it isn't building, you should check for existing bug reports, file one if necessary, and perhaps try to fix the

My Perl module from CPAN won't install, what do I do?

流过昼夜 提交于 2019-12-01 17:51:28
This is a canonical question for the above problem, inspired by this answer and this question . Please edit and improve it. I'm trying to install a module from CPAN, using the CPAN/cpanm/CPANPLUS client. However, I'm getting build or test errors when I try to install it. What should I do? dsolimano Does it build at all? The first thing to consider is, is your module building at all? If it isn't building, you should check for existing bug reports, file one if necessary, and perhaps try to fix the issue yourself (steps 2 and 3b/3c below). If it builds but tests fail, follow these steps. 1.

Client of web service in Perl

只愿长相守 提交于 2019-12-01 14:15:15
I am the client - I wish to call methods of a web service. I have a web service address (.svc suffix) and I have the method's name, return value and their argument. The service is implemented with WCF (HTML end point). I wish to call those methods by SOAP::Lite . What should I write for the URI, proxy and how exactly do I call the methods? You set the proxy to the endpoint and the uri (or in the most recent version ns ) to the namespace in the method definition. One of the easiest ways to do this is simply to use the WSDL URI and create a SOAP::Schema object with it, like so: my $schema = SOAP

Client of web service in Perl

*爱你&永不变心* 提交于 2019-12-01 12:24:59
问题 I am the client - I wish to call methods of a web service. I have a web service address (.svc suffix) and I have the method's name, return value and their argument. The service is implemented with WCF (HTML end point). I wish to call those methods by SOAP::Lite . What should I write for the URI, proxy and how exactly do I call the methods? 回答1: You set the proxy to the endpoint and the uri (or in the most recent version ns ) to the namespace in the method definition. One of the easiest ways

Defining common variables across multiple scripts?

僤鯓⒐⒋嵵緔 提交于 2019-12-01 08:02:06
I have a number of Bash and Perl scripts which are unrelated in functionality, but are related in that they work within the same project. The fact that they work in the same project means that I commonly specify the same directories, the same project specific commands, the same keywords at the top of every script. Currently, this has not bitten me, but I understand that it would be easier to have all of these values in one place, then if something changes I can change a value once and have the various scripts pick up on those changes. The question is - how is best to declare these values? A

Kill a hung child process

↘锁芯ラ 提交于 2019-12-01 05:44:19
My Perl script runs an external program (which takes a single command-line parameter) and processes its output. Originally, I was doing this: my @result = `prog arg`; However, turns out that the program is buggy and hangs unpredictably in rare cases. How can I kill the program if it hasn't exited after a certain amount of time? The script has to work both in Windows and in Linux, and it is my understanding that alarms and forks don't work well (or at all) in Windows. I found a module called IPC::Run but I can't figure out how to use it properly from its documentation. :-( I tried this: use

Kill a hung child process

孤街浪徒 提交于 2019-12-01 02:58:21
问题 My Perl script runs an external program (which takes a single command-line parameter) and processes its output. Originally, I was doing this: my @result = `prog arg`; However, turns out that the program is buggy and hangs unpredictably in rare cases. How can I kill the program if it hasn't exited after a certain amount of time? The script has to work both in Windows and in Linux, and it is my understanding that alarms and forks don't work well (or at all) in Windows. I found a module called

Perl - Package/Module Issues

末鹿安然 提交于 2019-11-30 20:05:28
From everything I've read on using Perl modules, the basic usage is: Module file with .pm extension, which includes the statement package <name> , where <name> is the filename of the module without the extension. Code file that uses module contains the statement use <name>; . The application I'm coding has one main code script which uses about 5 modules. I had forgotten to include the package <name> statement in the modules, but my code still ran just fine with the use <name> statement. I started receiving Undefined subroutine errors with one of the modules, so I added the package statement to

How can I install or upgrade a CPAN module that is in the latest Perl, without installing the new Perl?

人走茶凉 提交于 2019-11-30 09:00:40
问题 I'd like to install a Perl module (in this case, FindBin), but since it is included in the Perl 5.10.1 distribution, cpan wants to install Perl 5.10 for me. Is there a way of installing just the module via cpan ? The only option that I can see is installing directly from source, which seems a bit crude as there is no separate package (for example, Makefile.PL , etc.), just the bare .pm file. Since this is a small module that only has the one file, it's doable in this case, but what if I

Perl can't find module when run from cron.daily

喜你入骨 提交于 2019-11-30 05:30:02
问题 I have perl programs that use Net::Finger and have run successfully from cron.daily in Fedora 11. I just upgraded a server to Fedora 18 and these same perl programs no longer run from cron but run fine from command line when logged in as root. The error is: Can't locate Net/Finger.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) The path to the module is /root/perl5/lib/perl5