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

I have a script which is intended to maintain local databases of user login records (similar to last or lastlog) on a mix of Linux and HP-UX hosts. It was developed on the Linux side and works fine there, but HP-UX doesn't like it, complaining that

AnyDBM_File doesn't define an EXISTS method at /usr/local/bin/my_script.pl line 81

CPAN reports that AnyDBM_File is up-to-date on both the Linux and HP-UX test systems.

Is this a perl issue (and, if so, where would I look to fix it) or does it stem from an inadequacy in the underlying (C) DBM layer?

Replies are listed 'Best First'.
Re: AnyDBM_File::exists broken under HP-UX?
by dragonchild (Archbishop) on May 16, 2006 at 00:53 UTC
    AnyDBM_File doesn't actually do anything - it's an interface to other DBM modules. You need to have one of those installed. Do you?

    My criteria for good software:
    1. Does it work?
    2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
      Makes sense.

      I see that neither NDBM_File nor DB_File are installed on the HP-UX hosts. From there, I'm willing to assume that none of the others are, either.

      Looks like this is going to spin off yet another project, as attempting to install DB_File failed on account of not having gcc available... Time to see whether it would be easier to make CPAN work with a plain ANSI cc or to convince TPTB to authorize installing gcc. What fun.