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
2 answers

perl optional command line argument

I am new to Perl and wish to know if the following logic works in Perl :- I have to execute a command using Perl script with some arguments and I need to prepare that arguments list, some of the arguments are also optional ( may or may not…
Arpit
  • 4,259
  • 10
  • 38
  • 43
0
votes
1 answer

How to open and grab a window over TopLevel window

I want to open a window inside a toplevel window and until that window is opened I should not be able to move back to any previously opened window. Here is my code: $mw = MainWindow->new; # This will make my main Window $mw->title("Main…
Mak_Thareja
  • 179
  • 1
  • 2
  • 11
0
votes
1 answer

Discovering the depth and count of tables on an HTML page with Perl

I have local copies of numerous downloaded web-pages. The pages almost certainly have only a few different types of table layouts, but before looking to extract data, I first want to print out the depth and count of the tables that exist on each…
CrimsonDark
  • 661
  • 9
  • 20
0
votes
2 answers

Perl module Image::EXIF causes error message

I like to understand why this perl module is always creating this error message: In my script I do many things with the exif information of some pictures, that works fine. Here my minimized script: #! /usr/bin/perl use strict; use warnings; use…
Doris
  • 1
0
votes
1 answer

Perl module to allow for 'make' options

I was wondering if there is some kind of Perl module/package that allows for simple make-like functionality. For example, is there something that can wrap a function that receives an input and an output and only perform it if the output doesn't…
N.M
  • 685
  • 1
  • 9
  • 22
0
votes
2 answers

rpm installs fails even though dependent perl module is installed

I am building rpm package for internal software. It contains binaries and perl script/modules. During build process rpmbuild automatically scans perl code and builds dependency perl modules including DBD:mysql. When I try to install the software…
Hemant Shah
  • 203
  • 1
  • 3
  • 7
0
votes
1 answer

How can I use HTML::Template without creating separate files for each template?

The normal way of using HTML::Template is as follows: main file: my $template = HTML::Template->new(filename => 'secret.tmpl'); $template->param(SECRET_MESSAGE => $bar); print $template->output; secret.tmpl:

Hello
pavan
  • 334
  • 6
  • 20

0
votes
1 answer

How to check if one module is already opened in a Perl/Tk application

In a Perl/Tk MainWindow, in the menu bar, if I click on an option, then I can open same module twice, thrice etc. But if it is already opened, then it should not open again. Any idea how to do that? $mw = MainWindow->new; $mw->configure(-menu => …
Mak_Thareja
  • 179
  • 1
  • 2
  • 11
0
votes
1 answer

Curses::UI::Grid module

This is first example from perldoc use Curses::UI; my $cui = new Curses::UI; my $win = $cui->add('window_id', 'Window'); my $grid =$win->add( 'mygrid', 'Grid' -rows => 3, -columns => 5, ); # set header desc $grid->set_label("cell$_",…
mpapec
  • 50,217
  • 8
  • 67
  • 127
0
votes
3 answers

How to merge 2 lines in perl script

I am trying to write a Perl script that will transform the input ( name ( type .... ) ) into the output ( name ( type ... ) ) I.e. all these lines matching ( ) are merged into a single line and I want to update the original file…
Bhuvan Plaha
  • 13
  • 1
  • 2
  • 5
0
votes
2 answers

Cairo Perl module installation issue

I am trying to install Cairo Perl module locally, but it is throwing me error. $ /testdir/bin/perl -I /testdir/perl-5.14.0/lib Makefile.PL Package cairo was not found in the pkg-config search path. Perhaps you should add the directory containing…
chidori
  • 1,052
  • 3
  • 12
  • 25
0
votes
2 answers

Cant Locate Image/Info.pm Module Error

I'm trying to get the resolution,width,height of the images in the specific file. I have the following code. #use strict; use Image::Info qw(image_info dim); use File::List; #perl2exe_include Image::Info::JPEG; #perl2exe_include PerlIO; my…
Esther
  • 1
  • 1
0
votes
2 answers

image::Magick perl module - Multiple crop/resize manipulations from one Read and one Write?

I have a Perl script that uses the Image::Magick perl module to crop an existing image from a web form (that uses JCrop to feed me width, height, x, y). Because the cropped image will be used in a responsive design environment, I'm creating…
Andy Mussaw
  • 11
  • 1
  • 1
  • 4
0
votes
1 answer

Perl XML::SAX - character() method error

I'm new to using Perl XML::SAX and I encountered a problem with the characters event that is triggered. I'm trying to parse a very large XML file using perl. My goal is to get the content of each tag (I do not know the tag names - given any xml…
GPN
  • 1
0
votes
2 answers

issue with creating perl script to imitate linux command "ifconfig"

I have an assignment in which I am to create a Perl script in Linux to imitate the command ifconfig. This command basically shows you information about your network interfaces. I have already created the program, but a few lines are giving me some…
user218001
  • 35
  • 1
  • 8