Questions tagged [perl-module]

A Perl module is a reusable portion of Perl code.

In Perl, modules are vital to object-oriented design and can provide static variables referenced similarly to those in C++. The package model improves code organization, by allowing the coder to import functions from external files and 'bless' new object instances. Further, perl allows the directory structure holding modules to aid in the description of an object hierarchy. Perl module files traditionally have the extension '.pm'

see perlmod - perldoc.perl.org for more information.

1358 questions
0
votes
1 answer

Exception handling in perl using Exception::Class

I am using Exception::Class for handling exceptions At the above link, in the Synopsis, it is shown that in order to check which exception has occurred, we need to compare the $_->isa to its value. So, if I have 4 exceptions of different types, then…
prashanthkvs
  • 263
  • 1
  • 8
0
votes
1 answer

Perl modules not taken from the custom lib path

I have installed Perl into a custom directory ang set export_path. now which perl shows the custom path and Perl -V shows the details of custom path and @INC shows like custompath/lib/5.8.9 etc. The issue is, when I run the perl script that contain…
Futuregeek
  • 1,900
  • 3
  • 26
  • 51
0
votes
1 answer

Hadoop Streaming - Perl module dependency

When using Perl script as mapper & reducer in Hadoop streaming, how we can manage perl module dependencies. I want to use "Net::RabbitMQ" in my perl mapper & reducer script. Is there any standard way in perl/hadoop streaming to handle dependencies…
user703555
  • 265
  • 1
  • 7
  • 14
0
votes
1 answer

What is the third parameter to Text::JaroWinkler::strcmp95 for?

I am interested in the Jaro-Winkler module written in Perl to compute the distance (or similarity) between two strings: http://search.cpan.org/~scw/Text-JaroWinkler-0.1/JaroWinkler.pm The syntax of the function is not clear to me; I could not find…
paso
  • 168
  • 10
0
votes
2 answers

check and correct xml syntax in perl

I have a task to correct the syntax of xml files if they are not well formatted. Currently I am doing this task manually. Is there any way to validate the syntax of XML file, if XML is not well formatted then correct it to well formatted? Is it…
MangeshBiradar
  • 3,820
  • 1
  • 23
  • 41
0
votes
1 answer

Installing Event::Lib in CitrusPerl install on Mac OS X 10.7

I'm working on a Perl project that requires Event::Lib. I'm on MacOS 10.7, and am running Citrus Perl instead of the system Perl. I installed libevent from source and it compiled fine. But, when I go to install Event::Lib, I run into some…
coding_hero
  • 1,759
  • 3
  • 19
  • 34
0
votes
4 answers

Compare time with Perl

I want to check if current time is small , equal or great of 20:00 ( for example). How i can do it with Perl? Thanks.
VladB
  • 69
  • 4
  • 6
0
votes
3 answers

How do I install the Perl module WWW-Mechanize-Firefox?

Can you tell me where to find a guide on how to install a perl module? I am trying to install the perl module: http://metacpan.org/pod/WWW::Mechanize::Firefox::Installation I am stuck at step 7. I am not sure where the problem lays exactly,…
user1690130
  • 500
  • 2
  • 7
  • 26
0
votes
1 answer

h2xs: How to create directory structure

I am using h2xs v. 1.23 to create Perl modules. But every time I use the command h2xs -A -X -n Module::Foo I get this directory structure: Module-Foo/lib/Module/foo.pm. That results in ugly single directories for all Modules. My desired structure…
pyr0
  • 377
  • 1
  • 14
0
votes
2 answers

How to install XML::LibXML on Windows?

How do I install perl module XML::LibXML on windows? thanks
user2010736
0
votes
1 answer

Issue installing and referencing CPAN module in Strawberry Perl on Windows 7

I have downloaded a perl module cfrom CPAN using Strawberry Perl's CPAN client tool. It got successfully installed. I wrote a small perl script to use the module. But I am getting the following error: Undefined subroutine &main::chisquare called at…
user466663
  • 815
  • 4
  • 18
  • 40
0
votes
3 answers

Writing directly to a referenced variable in a subroutine from another module in perl

I am trying to pass reference of a hash into a subroutine defined in another module in order to increase performance. In the subroutine in this other module reference is dereferenced as: sub subRoutine{ my $hash_ref = $_[0]; my %hash =…
Genom
  • 158
  • 2
  • 11
0
votes
3 answers

Perl module version

I have a couple of perl modules installed in the $HOME of my web server. The web server used to run perl 5.8.8 so they were installed under $HOME/perl/lib/perl5/5.8.8/... During a server migration, the web hosting company changed perl to 5.10.1 but…
appleton
  • 168
  • 1
  • 11
0
votes
2 answers

How to call same subroutine from Perl module in different ways? What is Perl Module "Default mode"?

I've written a perl module (say foo), with one primary subroutine (say f()), which I want to use in two ways: Import module foo , then call the sub f(...) from the script importing module foo. Just import module foo and get module foo to call the…
Clinton
  • 22,361
  • 15
  • 67
  • 163
0
votes
2 answers

How to extract a column of a table from html page using perl modules?

I have the following html code of a part of a webpage.

Failed Process

UKR
  • 83
  • 1
  • 1
  • 5
pid Priority