cpan

How do I find the module dependencies of my Perl script?

I want another developer to run a Perl script I have written. The script uses many CPAN modules that have to be installed before the script can be run. Is it possible to make the script (or the perl binary) to dump a list of all the missing modules? Perl prints out the missing modules’ names when I attempt to run the script, but this is ...

Are there CPAN modules that will help me parse an RSS or ATOM feed in Perl?

I need code in Perl for requesting and parsing ATOM and RSS feeds. Is there a CPAN module(s) for that? ...

How do YOU manage Perl modules when using a package manager?

A recent question here on SO got me thinking. On most Linux distributions that I tried, some Perl modules would be available through the package manager. Others, of course, not. For quite a while I would use my package manager whenever I needed to install some CPAN module to find out whether a package was available or not and to install...

Where is detailed documentation on Class::DBI's sth_to_objects() method?

How do I find detailed documentation on the behavior of the sth_to_objects() method in the Class::DBI module? ...

How do I fix "`as_number' is not a Pari function name" in Math::Pari called by Math::BigInt?

On Perl 5.8.5 I am seeing the error listed in the question. I am running these version modules: Math::BigInt: 1.89 Math::BigInt::FastCalc: 0.19 Math::BigInt::GMP: 1.24 Math::BigInt::Pari: 1.13 Math::BigRat: 0.22 bignum: 0.22 The module producing the error is Math::Pari. This is all in an attempt to get Net::SFTP working to put a f...

How can I edit Kerberos 5 configuration files with Perl?

Has anyone come across a Perl module that will parse (and write) kerberos configuration files (ie /etc/krb5.conf)? I have looked at quite a few parsing modules like Config::General, Config::Auto, etc., but none seem to be able to handle nested structures like the following: pam = { debug = false ticket_lifetime = 36000 renew_lifet...

What can make Class::Loader fail where "use" and "new" do not?

I'm working on a very large CGI application that uses Crypt::RSA, which is properly installed. I get a "attempted to call a null reference as a function" type of error (I can't go back to get the exact error right now because we had to rollback for a release date) when I try to run any the embedded library. I trace the null reference t...

How do I use CPAN.pm to download other Perl modules?

Hi. I'm new to Object-Oriented programming and the perldoc page on CPAN.pm confuses the hell out of me. My program needs to download a couple of modules if they don't already exist. Is this basically just: CPAN::Shell->install("Module::Name::Here"); or is there more to it? Does that download the package, unarchive it, and install it, ...

How can I install a CPAN module into a local directory?

I'm using a hosted Linux machine so I don't have permissions to write into the /usr/lib directory. When I try to install a CPAN module by doing the usual: perl Makefile.PL make test make install That module is extracted to a blib/lib/ folder. I have kept use blib/lib/ModuleName but it still the compiler says module can not be found. ...

What is the best Perl module to use for creating a .pdf from scratch?

There are quite a number of modules on CPAN relating to the creation and manipulation of .pdf files, and I'm hoping this community can save me some time going down blind alleys. I am looking to create .pdf files from scratch, with only simple formatting such as bold/italic and left/right/center justify. Being able to use a template fil...

How do I find out the filename of a Perl package?

I would like to translate a Perl package name to the full path of the file. say package_name_to_path('Foo::Bar::Baz'); /tmp/Foo/Bar/Baz.pm I know there is a CPAN module to do this? I just can't find it again? ...

Why can't Perl's PAR find the loadable object for Socket.pm?

I was using PAR::Packer to package my Perl application on Cygwin and then running it on HPUX. A simple hello world works well, e.g.: pp -p hello.pl That results in a.par and then on HPUX: parl a.par It works great. However when package a bigger application with many dependencies with -B bundle switch, no such luck, instead I get...

How can I install Perl module without using CPAN.pm?

Is it possible? ...

How do I choose a package name for a custom Perl module that does not collide with builtin or CPAN packages names?

I have read the perldoc on modules, but I don't see a recommendation on naming a package so it won't collide with builtin or CPAN module/package names. In the past, to develop a local Session.pm module, I have created a local directory using my company's name, such as: package Company::Session; ... and Session.pm would be found in di...

Why do you not use CPAN modules?

ETA: When I ask "Why do you not use CPAN modules?", I am referring to the people who refuse to use any CPAN modules (including high quality ones like DBI). Not all CPAN code is of high quality, and it is fine to stay away from modules that are trivial or are based on experimental code (I got annoyed at a developer the other day for want...

CPAN modules for computing integer hash keys based on short strings

I'm looking for a CPAN module that will take a short string: my $hash_value = hash_this('short string not too long'); And hash it into an integer key: say $hash_value; 12345671234 # an integer key ...

Is there a CPAN module that digests a short string into a short number?

I need to create unique numerical ids for some short strings. some.domain.com -> 32423421 another.domain.com -> 23332423 yet.another.com -> 12131232 Is there a Perl CPAN module that will do something like this? I've tried using Digest::MD5 but the resulting numbers are too long: some.domain.com -> 29680057245717615035661393...

Is there a Perl module to monitor an email queue?

I'm working on an issue tracking system and would like the application to handle email replies. That is, I would like a script that can monitor an email queue and perform some action based on the email contents. It should then be able to delete the email, etc. I currently use MIME::Lite to send email, and I can handle writing the scri...

How do I tell CPAN.pm to install all modules in a specific directory?

I have set makepl_arg [INSTALLDIRS=site PREFIX=~/perl] mbuildpl_arg [--install_base ~/perl] in the CPAN.pm configuration. I had hoped that this would cause modules to get installed in the same place, but I still have to set multiple paths in PERL5LIB: export PERL5LIB=~/perl/share/perl/5.10.0:~/perl/lib/perl5/:~/perl/l...

When should I use Perl CGI instead of PHP (or vice versa)?

For hobby purposes, I have a shared space on a hosting server that is providing, as many of them are, both PHP and Perl CGI. I have read on several places that CGI scripts are obsolete now, I think mainly for performance issues (like http://stackoverflow.com/questions/313083/is-php-or-vanilla-perl-cgi-faster). But since I just started ...