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
5
votes
1 answer

How to install the perl DateTime module under CentOS8. yum install "perl(DateTime)" worked in CentOS7 but not in 8

There are some Perl modules that could previously be installed with: yum install "perl(DateTime)" Under CentOS7. In CentOS8 I get the error: No match for argument: perl(DateTime) I have the same problem for perl(Template), perl(YAML::XS),…
testcaseone
  • 287
  • 1
  • 2
  • 11
5
votes
1 answer

How do I parse E-Mail contents

How to parse the Email into sections like, header, body, attachment, and sender and receiver? I would like to use Perl or Perl Moose?
jubf
  • 51
  • 1
  • 2
5
votes
6 answers

Is there anywhere I can find information on the relative popularity of Perl modules?

One of the problems of using CPAN is that "there's more than one module to do it". I often wonder what everyone else is using. Is there any information on the relative popularity of CPAN modules anywhere?
user181548
5
votes
9 answers

Perl 5 - Iterator

I have implemented a simple iterator in perl. I normally work with C#, and use iterators and functional programming quite frequently. So I thought it would be simple to get some basics working in perl. Problem is, I'm getting some poor…
jonathanpeppers
  • 26,115
  • 21
  • 99
  • 182
5
votes
3 answers

Using a variable as a method name in Perl

I have a perl script (simplified) like so: my $dh = Stats::Datahandler->new(); ### homebrew module my %url_map = ( '/(article|blog)/' => \$dh->articleDataHandler, '/video/' => \$dh->nullDataHandler, ); Essentially, I'm going to loop…
Glen Solsberry
  • 11,960
  • 15
  • 69
  • 94
5
votes
2 answers

Perl CGI Scripts cannot find modules in library

This is an Apache / Perl problem that I am having. I am using a CPAN Module in my perl CGI application. It is Spreadsheet::ParseExcel I have installed the cpan module with tar.gz files. I have installed the dependencies. However, I did do so as a…
bleutyler
  • 51
  • 1
  • 3
5
votes
1 answer

How do you get complete Kwalitee output for a Perl module before uploading it?

After I upload a module to PAUSE I can go sometime later to cpants.cpanauthors.org or metacpan.org and see a bunch of Kwalitee output and a Kwalitee score. How are you supposed to get this same information beforehand? For instance, I have the…
Ken Schumack
  • 719
  • 4
  • 11
5
votes
2 answers

unable to install CPAN using Yum on CentOS 7.3

while trying to install "CPAN" using Yum command [CentOS 7.3(64-bit)] I am getting below error: ---> Package glibc.i686 0:2.17-157.el7 will be installed --> Processing Dependency: glibc-common = 2.17-157.el7 for package: glibc-2.17-157.el7.i686 --->…
Ganesh
  • 505
  • 2
  • 9
  • 26
5
votes
3 answers

Perl Module Installation

I am attempting to install a Perl Module entitled: File-Copy-Recursive and I am following these steps: 1) open cmd.exe 2) perl -MCPAN -e 'install File::Copy::Recursive;' and I receive the message "It looks like you don't have a C compiler and make…
Christopher Peterson
  • 983
  • 7
  • 22
  • 32
5
votes
4 answers

Installing Perl modules to a specific location

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…
user44697
  • 313
  • 4
  • 11
5
votes
5 answers

Perl using a variable to reference a module messes up passing parameters

I have a problem when using a variable to reference a module, it seems to mess up the passing of the variables: TOTO.pm package TOTO; use Data::Dumper; sub print { print Dumper(@_); } Perl program package main; TOTO::print('Hello…
juettemann
  • 323
  • 2
  • 14
5
votes
2 answers

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

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…
snoofkin
  • 8,725
  • 14
  • 49
  • 86
5
votes
4 answers

Setting Up Perl Module Structure

I'm having trouble figuring out how to structure Perl modules in an object oriented way so I can have one parent module with a number of submodules and only the specific submodules that are needed would be loaded by a calling script. For example I…
Russell C.
  • 1,649
  • 6
  • 33
  • 55
5
votes
1 answer

Perl Module Error - defined(%hash) is deprecated

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…
virtual020
  • 47
  • 1
  • 4
5
votes
1 answer

How do I increase the RGB value of a specific pixel with Image::Magic in Perl?

I want get 1 pixel (x=3, y=3) and change its RGB values (R from 100 to 101, G from 99 to 100, B from 193 to 194). use strict; use Image::Magick; my $p = new Image::Magick; $p->Read( 'myfile.jpg' ); my $pix = $p->GetPixel( width …
Anton Shevtsov
  • 1,279
  • 4
  • 16
  • 34