Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Problems after Perl was updated on FreeBSD.

by techcode (Hermit)
on Feb 27, 2006 at 19:28 UTC ( [id://533128]=perlquestion: print w/replies, xml ) Need Help??

techcode has asked for the wisdom of the Perl Monks concerning the following question:

Hello fellow monks!

I'm having a problem with some Perl code that stopped running after Perl was updated on a FreeBSD box.

I'm not sure what went wrong (I do not have root access to the server, nor I did the update) but I'm suspecting paths are now wrong.

The error message says that HTML::Parser is missing. And as code worked in the past there had to be HTML::Parser on that machine. Not sure what happened to it ...

Another thing that seems interesting - is that in @INC there are a lot of different folders, pointing to various Perl installation. But I haven't seen any that contains "site" (which I believe is similar in meaning with "local" - folder where non-default modules are installed). So it might mean that Perl is only accessing modules that are shipped with it.

Can anyone point me out to some source where I can check the right procedure for updating Perl or changing (whole server) INC?

Any other idea is welcome ...


Have you tried freelancing? Check out Scriptlance - I work there.
  • Comment on Problems after Perl was updated on FreeBSD.

Replies are listed 'Best First'.
Re: Problems after Perl was updated on FreeBSD.
by madizen (Sexton) on Feb 28, 2006 at 01:26 UTC

    From time to time (especially if Perl is jumping up a version) there are special FreeBSD update procedures that need to be performed to make all the modules happy again. You might ask the admin to look in their copies of /usr/src/UPDATING and /usr/ports/UPDATING for any Perl-specific incantations that they should be performing relative to whatever updates were done.

    The last time I had to do anything like that, a script had been provided that did everything needed, it just needed to be called up and run by the admin.

    Update: If your admin is tracking FreeBSD ports updates closely, the recent upgrade to Perl 5.8.8 specifically requires that the admin heed the wisdom of

    man perl-after-upgrade

    If used correctly perl-after-upgrade will harmonize Perl versions with Perl packages with everything else in FreeBSD's ports tree. It is not run automatically when upgrading the core Perl package because it may be destructive. For instance on my FreeBSD build server with lots of package dependencies I get:

    --- Fixed 62 packages (1234 files moved, 8 files modified) Skipped 201 packages **** In addition, please pay attention to the following: The /usr/X11R6/bin/gnomedb-fe binary would be modified, make sure it w +orks The /usr/local/sbin/snmpd binary would be modified, make sure it works The /usr/local/sbin/snmptrapd binary would be modified, make sure it w +orks
Re: Problems after Perl was updated on FreeBSD.
by swampyankee (Parson) on Feb 27, 2006 at 19:55 UTC

    If you don't have write permissions in the perl folders, you'll need to get your sysadmin to do it. I suspect HTML::Parser is not a core module. Check out CPAN for corelist; it doesn't show up as a core module (under ActiveState reinstalled.

    Alternatively, you can try adding the path to HTML::Parser module with

    use lib /path_with_HTML::Parser/; use HTML::Parser;
    but this won't work if the person running the program doesn't have access to the /path_with_HTML_Parser.

    My first suggestion would be to have your sysadmin install HTML::Parser.

    emc

    " When in doubt, use brute force." — Ken Thompson
      Maybe I haven't made myself clear...

      HTML::Parser is not core module, and it is (was) installed on the server. After Perl update it can't be found anymore by the perl. And I believe that if you update Perl installed modules remain - simply because it would be stupid to be other way and require from you to install all the (non core) modules after each Perl update.

      I suspect that the sysadmin (who I assume did the update) didn't do the update right - and somehow forgot to include the folders where non-core modules are installed in the INC.

      I've been trying to figure out how to add stuff to the @INC for the whole server - Config.pm seems to hold some of that info on Windows, but I'm not sure for FreeBSD (probably the same). Also not sure about where it is specified where to look for Config.pm ...


      Have you tried freelancing? Check out Scriptlance - I work there.
Re: Problems after Perl was updated on FreeBSD.
by brian_d_foy (Abbot) on Feb 28, 2006 at 00:22 UTC

    When you recompiled Perl, you probably changed the default module search path. Although HTML::Parser is on the box, it's probably not in the search path. (perl -V will tell you what's in @INC).

    You might just have to change your @INC locally (PERL5LIB, use lib, etc) to help Perl find the module.

    Additionally, you might have to recompile some modules. I suggest a case of beer and a trip to your sysadmin's office. If he's in a different location, you can use one of those services that send beer baskets :)

    Good luck :)

    --
    brian d foy <brian@stonehenge.com>
    Subscribe to The Perl Review

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://533128]
Approved by spiritway
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (7)
As of 2024-04-23 20:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found