perl-module

Which Perl module would you recommend for JSON manipulation?

Deadly 提交于 2019-11-26 21:47:40
问题 As usual, I'm happy to deal with CPAN because it got all we need. As usual, I'm lost because there is plenty of stuff. I can find the core JSON one by myself, and feel enthusiastic by a JSON::Tiny other. My needs are very simple (parsing stuffs from the Open Library API) and, maybe someday, expose our own data. Is there any other modules that you like for this task? 回答1: JSON module works like a champ, but if you need a faster parser, use this one: JSON::XS, which requires a native

Installing modules using Strawberry Perl

[亡魂溺海] 提交于 2019-11-26 19:01:54
问题 Until now I used ActiveState's ActivePerl, and used the ppm for installing modules. Last week I moved to Strawberry Perl, but I don't know how I should install modules using Strawberry Perl. What is some information on how module installation is done using Strawberry Perl or is there some link on how to install new modules? 回答1: You can still use ppm , but it is not recommended. Run CPAN client from the Strawberry Perl or Strawberry Perl (64-bit) , sub folder Tools , entry in the Start menu.

How to check availability of Perl, its version and presence of a required module?

我与影子孤独终老i 提交于 2019-11-26 18:26:47
问题 I have written a Perl script, I just want to give it to every one, for that I planned to write a bash script which is used to test the environment of a user and find whether that environment is capable of running the Perl script. I want to test the things like: Whether Perl has installed in that system Perl should have the version 5 or more Whether the module JSON::Any is available Any suggestion would greatly appreciated :-) 回答1: if perl -MJSON::Any -e 'print "$JSON::Any::VERSION\n"' >/dev

Manual installation of a Perl Module

自古美人都是妖i 提交于 2019-11-26 16:35:27
问题 I have downloaded the module Digest::SHA1 and extracted it to a directory (../Digest-SHA1-2.13/) , then copied all the SHA1.* files into (../Digest-SHA1-2.13/Digest) and in the perl script, I did : use Digest::SHA1; launching the script like this: perl -I ../Digest-SHA1-2.13/Digest perlscriptname.pl I get this error: Can't locate loadable object for module Digest::SHA1 in @INC I assume it has something to do with a shared library (*.so)?, I have no idea how to continue from here. I can

How does a Perl program know where to find the file containing Perl module it uses?

点点圈 提交于 2019-11-26 14:08:23
问题 If my Perl program uses Perl modules, how will it determine where to find the file containing the module code? For example, if the program contains: use MyModule1; # Example 1 use This::Here::MyModule2; # Example 2 where will it look? 回答1: Perl interpreter (which runs your perl program) will use a special array called @INC to search for a file containing the module. Each value in the @INC array is a directory name ( but see note below ); Perl will search within those directories in a loop