perl-module

Perl Module Error - defined(%hash) is deprecated

可紊 提交于 2019-12-23 10:00:02
问题 Background: I am working to migrate a Linux server to a newer one from Ubuntu 10.04 to 12.04 This server is responsible for executing several a number of Perl modules via crontabs. These Perl Modules rely heavily on 30-40 perl extensions. I have installed all Perl extensions and the crontabs are able to process successfully except for several Syntax errors caused by the newer versions of these Perl extensions. I need some help with modifying the syntax to get the Perl script to process as

How can I tell what modules were originally provided with the specific Perl installation on a machine?

有些话、适合烂在心里 提交于 2019-12-23 09:08:17
问题 How can I tell what modules were originally provided with the specific Perl installation on a machine? (This is not a duplicate of: How can I tell if a Perl module is core or part of the standard install? ( "How can I tell if a Perl module is core or part of the standard install?" ) - it is in fact a spin-off question from it ) I am looking for what came with the installation originally , what modules were provided as part of that installation, what was built-in. NOT what has been installed

Global symbol “$i” requires explicit package name

南笙酒味 提交于 2019-12-23 07:05:27
问题 I have 3 arrays and then I open a txt file which contains firstname , lastname and email(alone with some html codes like shown below) <first>Mike<first> <sec>stone<sec> <email>mike@rt.com<email> I first count the lines in the file, then I parse this file and put first , last and email in 3 different arrays and then I remove the htmls tags from each array element. But I'm facing problems like Global symbol required explicit package name in one of the variable during removing the html tags even

Can one pass Perl object references between modules?

痞子三分冷 提交于 2019-12-23 03:01:55
问题 Example code: testClass1.pm package testClass1; { my $testClass2Ref; sub new { my($class) = shift; $testClass2Ref= shift; bless $self, $class; return $self;} } sub testRef { $testClass2Ref->testRef; } } testClass2.pm package testClass2; { sub new { my($class) = shift; bless $self, $class; return $self;} } sub testRef { print "Test 2"; } } test.pl use testClass1; use testClass2; my $testClass2 = testClass2->new(); my $testClass1 = testClass2->new($testClass2); $testClass1->testRef; When I try

How do I use Perl's Google::Search to look for specific URLs?

风流意气都作罢 提交于 2019-12-21 19:30:23
问题 The Google::Search module, which is based on the AJAX Search API, doesn't seems to work very well, or it is just me? For example, I use firefox to search google for: http://bloggingheads.tv/forum/member.php?u=12129 It brings results. But when I use the module this way: $google_search = Google::Search->Web ( q => "http://bloggingheads.tv/forum/member.php?u=12129" ); @result = $google_search->all; I get nothing in the array. Any idea? Seems like this API doesn't bring the same results like when

How do I use Perl's Google::Search to look for specific URLs?

♀尐吖头ヾ 提交于 2019-12-21 19:30:10
问题 The Google::Search module, which is based on the AJAX Search API, doesn't seems to work very well, or it is just me? For example, I use firefox to search google for: http://bloggingheads.tv/forum/member.php?u=12129 It brings results. But when I use the module this way: $google_search = Google::Search->Web ( q => "http://bloggingheads.tv/forum/member.php?u=12129" ); @result = $google_search->all; I get nothing in the array. Any idea? Seems like this API doesn't bring the same results like when

Perl : Two packages in same file cannot import same package?

好久不见. 提交于 2019-12-21 06:28:34
问题 This is an interesting Perl behaviour. (atleast to me :) ) I have two packages PACKAGE1 and PACKAGE2 which exports function with same name Method1() . As there will be so many packages which will export this same function, use -ing everything in a Perl file will be tedious. So, I have created a general include file INCLUDES.pm which will have these use s. INCLUDES.pm: use PACKAGE1; use PACKAGE2; 1; PACKAGE1.pm: package PACKAGE1; use Exporter; our @ISA = qw(Exporter); our @EXPORT = qw (

Passing Main script variables into Perl Modules

旧街凉风 提交于 2019-12-20 07:56:43
问题 I am writing a Perl script that is run by a user and makes use of the current Linux environment as variables and other variables as well. The environment settings may change and be different from what they were originally. However, I'm trying to use self-contained Perl Modules and need to be able to access these variables. What is the best practice to go about doing this? I can just pass along 10 variables when I create an object using the Perl Module, but that seems excessive... Thanks 回答1:

How do I compile a Perl module on Windows with Strawberry?

£可爱£侵袭症+ 提交于 2019-12-20 03:57:13
问题 This is more an open discussion and a conclusion than a real question, hoping it can help someone sometime. I was looking on how to make Perl module on an Internet disconnected server (otherwise the answer is quite simple: use cpan ), so the only option I have is to manually compile the modules downloaded from the Internet (CPAN or others) directly on the server. The problem was that, on a standard Windows server, there is no compiler. So how do I make the modules? 回答1: If you look in your

Installing Perl modules to a specific location

房东的猫 提交于 2019-12-20 02:49:30
问题 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