PDA

View Full Version : Question about Locale::Country


manish
09-21-2001, 05:59 PM
Hi,

I am trying to install a perl script into a local directory on my account and I get the following error message:
Warning: prerequisite Locale::Country 0 not found at (eval 1) line 220.

Can somebody please tell me how I can search for the specific library it is looking for? Also, on that note, what exactly is a .pm file? The Makefile.PL script looks for many modules including the Locale::Country module and apparently it is looking for some .pm file.

Here's the line that is looking for the modules:

'PREREQ_PM' => {
'LWP::UserAgent' => 0,
'HTTP::Request' => 0,
'Locale::Country' => 0,
'Date::Calc' => 0,
'Data::Dumper' => 0,
'HTML::LinkExtor' => 0,
'XML::Parser' => 0,
}


Please bear with me. I don't know Perl and I am trying to learn it. Can somebody also point me to some good links on Perl?


<edit>
I just found more modules that another script is failing on:

Warning: prerequisite File::Cache 0.1 not found at (eval 2) line 220.
Warning: prerequisite HTML::FormatText 0 not found at (eval 2) line 220.
Warning: prerequisite LockFile::Simple 0 not found at (eval 2) line 220.
Warning: prerequisite Log::Agent 0 not found at (eval 2) line 220.
Warning: prerequisite Log::Agent::Driver::File 0 not found at (eval 2) line 220.
Warning: prerequisite Log::Agent::Rotate 0 not found at (eval 2) line 220.
Warning: prerequisite Time::CTime 0 not found at (eval 2) line 220.
Warning: prerequisite Time::ParseDate 0 not found at (eval 2) line 220.





Thanks for all your help,
Manish

sheila
09-21-2001, 08:18 PM
Well, if you go to your CNC and look under "Server Info", there is a choice there called "Perl Modules". If you click on that link, it will take you to a page with a lot of information about the Perl version installed. Scrolling down will take you to a list of the Perl modules installed on your server.

I'm on NINE, and I don't find Locale::Country (although it may be installed on some of the other servers???). I do see a module called
locale
but I assume that is something not quite the same.

As for a .pm file, I'm guessing that's a perl module??? Dunno.

manish
09-22-2001, 02:23 AM
Sheila,
Thanks for the reply.

The following page has all the modules that I am looking for.
http://www.perl.com/CPAN/modules/by-module/
However, I wanted to make sure that it is alright with Futurequest if I install the modules listed above.
Also, can somebody tell me how I can add my local library directory to my library path so that all my scripts look for perl modules in my local account directory as well. I know that I can add the use lib 'path' line in my perl scripts. Is this a good way of modifying the library path?

Thanks,
Manish

Rich
09-22-2001, 04:07 AM
As Shiela pointed out, .pm refers to a Perl Module...

The following page has all the modules that I am looking for.
http://www.perl.com/CPAN/modules/by-module/
However, I wanted to make sure that it is alright with Futurequest if I install the modules listed above.
Yes, CPAN is the 'clearinghouse' for all Perl modules. Futurequest does allow you to establish your own private Perl module directories. Of course, in doing so, you also assume the responsibility for building (and debugging) these libraries and maintaining comptability between these libraries and the rest of the (potentially to be modified and changed) FQ infrastructure (as opposed to the other way around). In other words, once you begin your own Perl libraries, you are "own your own" with respect to maintaining theses libraries.

Also, can somebody tell me how I can add my local library directory to my library path so that all my scripts look for perl modules in my local account directory as well. I know that I can add the use lib 'path' line in my perl scripts. Is this a good way of modifying the library path?
Yes, the 'use lib ...' method is the 'good' way as well as the 'only' way to include your own libray path of modules into your own scripts.

[side note] I know that earlier you said that your are just learning Perl and its (seemingly infinite) "multiple ways of doing things" (tm). I can tell from your posts in this thread that you are one that learns quickly by "digging on your own." While it would be great if there were just a few free links where you can learn everything you need about Perl, to really become proficient at Perl, you will need to invest in a few books. This doesn't mean that there aren't some very, very good links that can teach you a LOT--and you can search this form to some very good "learning curve" links. However, books that you can "sink your teeth into" and have as a ready reference is invaluable to learing Perl. In addition, this more formal "book" education is really a requirement for any Site Owner that is using Perl/CGI in a production environment. For more info on books, see:

http://www.aota.net/forums/showthread.php?s=&threadid=3328&highlight=perl+cookbook+advanced+learning

which lists my (suggested) Perl curriculuum as well as recommdations from others.

Rich
-- Waiting for Shiela to focus all her engergies on Perl, so she can "teach us a few things about a few things"

-- "I have reviewed ASP, ColdFusion, "this" language, and "that" other language, but by far the *best* language for CGI Web sites is undisputably Perl" -- author unknown :)

manish
09-22-2001, 04:18 AM
09-22-2001 03:07 AM Wow, I thought I was the only geek awake at 3 am on a Friday night :)

Rich, thanks a lot for the info. I just finished installing all the modules (It was very painful because a lot of them had other dependancies) I kind of realized that Futurequest will not take any responsibliity. I will make sure that I keep things up to date. Perl was one of the languages I always wanted to learn but never had a chance/need to. Now, I want to do some cool stuff on my web page. That's why I'm trying to play around with perl/php.

Again, thanks a lot...
Manish

--I should get some sleep now :)

sheila
09-22-2001, 04:26 AM
-- Waiting for Shiela to focus all her engergies on Perl, so she can "teach us a few things about a few things"
<snort>
Well, I will admit, that about two weeks ago, I did install Active Perl on my home machine, and check that if I booted Apache up, that I could run Perl scripts. You know, just in case I wanted to check out a Perl script locally, or something.

Still, I was looking at the Ikonboard source last night (v. 2.1.9) and wondering WHY anyone would want to mess with that hideous language. ~#

Some day...

Rich
09-22-2001, 04:36 AM
Well, I will admit, that about two weeks ago, I did install Active Perl on my home machine, and check that if I booted Apache up, that I could run Perl scripts. You know, just in case I wanted to check out a Perl script locally, or something.
Once you stick your toe in the water, someone is sure to push you in. :)

Still, I was looking at the Ikonboard source last night (v. 2.1.9) and wondering WHY anyone would want to mess with that hideous language.
Don't judge all books by their lack of pages. :P

Rich
-- Come on in...the water's fine...

Terra
09-22-2001, 05:11 AM
I'm not sure how I blitzed this thread - but I see it now... ;)

Something about being so buried in work at the moment that seeing the sun is a gift, not a right... :P

Manish:
1) What program are you trying to install that needs all these modules?

2) Are you simply tinkering, or will it become a permanent part of your web site?

I am more critical of installing perl modules now due to increasing bloat... Nothing is more frustrating then installing a whole slew of perl modules only for the site owner to get bored with them in a few days leaving them to become stagnant... Some of the modules are difficult to integrate like XS modules, or the modules that have a gazillion dependencies... I think the most frustrating modules are the ones that try to force you to install the latest version of perl since it's part of the distribution core module set... :QTbeam:

Anyhow, the answer to local installs is contained within setting the proper local 'prefix' when doing a:
$perl Makefile.PL prefix=/big/dom/xyourdomain/perl_modules

Then using the 'use lib' pragma as Rich stated above... You can also 'unshift' the @INC array, however which you use is up to you for research...

--
Terra
--My work is so timesliced right now it's not even funny that I feel like my brain is IBM--
FutureQuest

manish
09-22-2001, 12:13 PM
Terra,

1) I was trying to (or rather I have installed ) NewsClipper (www.newsclipper.com). This is a perl script that basically takes snippets from webpages and formats it on one single page so that you can a summary of multiple pages on one page. Or better yet, you can integrate it in a frame on your web page. They have about 200 websites that they pull details out of (such as slashdot, cnn and yahoo) I think it's really cool :QTwow:, but I am easy to amuse. I also installed Webfetch (www.webfetch.org) but Newsclipper has a bigger database of web pages and filters...

2) Originally, I was only tinkering around with it. Howewer, now I believe that I am going to make it a permanent part of my website (once I figure out how to configure this for multiple users :) )
All libraries take up about 2M on my account. I still have plenty of space left, but if you get some time, I would love to get rid of the perl modules installed in my local directory. The only problem is that I have already deleted my install directories, I'll have to go through my lib directory to give you the names of all the perl modules.

Just as an added note, if anybody is installing perl modules, the install of man pages will fail unless you specify the man page directory as well. Here's the command line I was using:


perl -I/big/dom/xdomain/perllib/lib/site_perl/5.005 Makefile.PL PREFIX=/big/dom/xdomain/perllib
INSTALLMAN1DIR=/big/dom/xdomain/perlman INSTALLMAN3DIR=/big/dom/xdomain/perlman


Although, I still haven't figured out how to change my man page path.

Thanks,
Manish

--One thing at a time

<edit>
Newsclipper is at www.newsclipper.com and not .org. Sorry :ididthat: