Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Long shot HeadParser.pm Perl ?...

Long shot HeadParser.pm Perl ?...
Thread Tools
Stingrey
Forum Regular
Join Date: Mar 2003
Location: San Antonio
Status: Offline
Reply With Quote
Oct 25, 2003, 11:19 PM
 
I have an app that I had a cronjob set to run called getdata.pl, a Perl script that runs courtesy of Showtimes (app for palm that dloads movie times for you, works great on the treo 600 and faster than using the sometimes down sprint web service)... It ran great in Jag, upgraded to Panther (which uses perl 5.8.1 versus the I perl 5.8 that I used to have running... I'm not that great at all this *nix stuff, but I do try, so please don't make fun of me :) Anyhow, the error I get when trying to run the script is:

500 Can't locate HTML/HeadParser.pm in @INC (@INC contains: /System/Library/Perl/5.8.1/darwin-thread-multi-2level /System/Library/Perl/5.8.1 /Library/Perl/5.8.1/darwin-thread-multi-2level /Library/Perl/5.8.1 /Library/Perl /Network/Library/Perl/5.8.1/darwin-thread-multi-2level /Network/Library/Perl/5.8.1 /Network/Library/Perl . .)

I have tried looking at the perl5db.pl file for 5.8.1, it makes no sense to me. Can I point it to the old HeadParser.pm file? I used cpan to install the HTMLParser.pm or whatever thinking that was part of that, but no go. Short of trying to run 5.8 (or can I simply do that? I tried running perl from the 5.8 directory against the script but got a different error altogether. Anyhow, how do I make this new perl know where the HeadParser.pm is or whatever? ANY help appreciated, and I apologize if this is in the wrong section, but to me it is X related in part, although I guess it is more software related technically. In either event, I'm stuck, tried a few things including copying the parser to the directory it was stating in the error, no go. Thanks!

Rey :)
     
Stingrey  (op)
Forum Regular
Join Date: Mar 2003
Location: San Antonio
Status: Offline
Reply With Quote
Oct 25, 2003, 11:28 PM
 
I also did:

cpan> force install HTML::Parser since I think the HeadParser is part of this install... In other words, I think all the stuff I need is there, but perl 5.6.1 doesn't see it :(
     
riverfreak
Mac Enthusiast
Join Date: Aug 2001
Status: Offline
Reply With Quote
Oct 26, 2003, 12:36 AM
 
Originally posted by Stingrey:
I also did:

cpan> force install HTML:arser since I think the HeadParser is part of this install... In other words, I think all the stuff I need is there, but perl 5.6.1 doesn't see it
Have you installed HTML::HeadParser? It should be in /Library/Perl

Why would you need to force install it? (you need to run perl -MCPAN -e shell as root unless you seperately do make, sudo make install...
     
Stingrey  (op)
Forum Regular
Join Date: Mar 2003
Location: San Antonio
Status: Offline
Reply With Quote
Oct 26, 2003, 01:16 AM
 
Yep, that's why I ran force install... As root, I installed using cpan already... When I do it again, it says it is already installed, so I tried to force again in case it just didn't take for some reason... I'm totally stumped. :( When I do an ls of /Library/Perl, I don't see HeadParser.pm listed, so I don't know if cpan is running using an old path and installing stuff into the wrong directory or something odd like that. I know enough to get by, so I hope I'm describing this in enough detail. Thanks, by the way, for the help! Anything else I can try or should look for?

Rey :)
     
riverfreak
Mac Enthusiast
Join Date: Aug 2001
Status: Offline
Reply With Quote
Oct 26, 2003, 01:49 AM
 
Originally posted by Stingrey:
Yep, that's why I ran force install... As root, I installed using cpan already... When I do it again, it says it is already installed, so I tried to force again in case it just didn't take for some reason... I'm totally stumped. When I do an ls of /Library/Perl, I don't see HeadParser.pm listed, so I don't know if cpan is running using an old path and installing stuff into the wrong directory or something odd like that. I know enough to get by, so I hope I'm describing this in enough detail. Thanks, by the way, for the help! Anything else I can try or should look for?

Rey
Well, I haven't checked the dependencies of HTML:arser, but it still looks like your script is not finding HTML::HeadParser. I would try installing this. If this doesn't work, please post the first 10 lines or so (including those that say things like 'use Head:arser'.)
     
Stingrey  (op)
Forum Regular
Join Date: Mar 2003
Location: San Antonio
Status: Offline
Reply With Quote
Oct 26, 2003, 10:01 AM
 
Yep, the script wasn't finding the parser, even though I already had installed it and force installed it again from cpan... I just installed perl v5.8.0 for now :( I don't know if that's gonna hose my system one day or not, but everything works fie and there is still a 5.8.1 directory, for what it's worth. Again, I know enough to be dangerous rather than get by, so hopefully what I did is ok with everything else, too. In the meantime, showtimes works again, so I'm good to go! I'd still like to know where the file is in whatever the current version of perl that calls for that htmlparser or specifies the path. I think it could have been as simple as modifying where it was looking at for @INC stuff.

Rey :)
     
riverfreak
Mac Enthusiast
Join Date: Aug 2001
Status: Offline
Reply With Quote
Oct 26, 2003, 10:33 AM
 
Originally posted by Stingrey:
Yep, the script wasn't finding the parser, even though I already had installed it and force installed it again from cpan... I just installed perl v5.8.0 for now I don't know if that's gonna hose my system one day or not, but everything works fie and there is still a 5.8.1 directory, for what it's worth. Again, I know enough to be dangerous rather than get by, so hopefully what I did is ok with everything else, too. In the meantime, showtimes works again, so I'm good to go! I'd still like to know where the file is in whatever the current version of perl that calls for that htmlparser or specifies the path. I think it could have been as simple as modifying where it was looking at for @INC stuff.

Rey
The default @INC path is specified at compile time. You can change @INC dynamically at runtime using the 'use lib' call in your script. Better yet, set your PERL5LIB variable for your environment.

Which perl are you using (ie % which perl) ?
What is your full @INC (perl -V)? From your first post, your @INC looks fine to me.

When you installed HTML::HeadParser (not HTML:arser), where was it installed? It's not part of the default perl installation...
     
Stingrey  (op)
Forum Regular
Join Date: Mar 2003
Location: San Antonio
Status: Offline
Reply With Quote
Oct 26, 2003, 10:57 AM
 
I guess somehow I thought HTML::Parser (not sure where it installed since did using cpan) was the same as HTML::HeadParser, so I guess that was my problem huh... I'll take another crack at it later on this week, but thanks for the info! That gives me some insight as to why my half asleep self couldn't get things going last night! In the meantime, showtimes has updated, today is sort of cold and windy, the perfect time to head out to the movies, and the treo is happy to accomodate again :) Thanks much! By the way, which perl gives:

/usr/local/bin/perl

but perl -v shows 5.8.0

Rey :)
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 04:14 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,