[HRPM] Is dbmopen different in Perl 5.6.0?
Mike Patten
mpatten at exis.net
Wed Apr 19 04:43:02 CDT 2000
On Tue, 18 Apr 2000 chicks at chicks.net wrote:
> On Mon, 17 Apr 2000, Mike Patten wrote:
> > 45. $HISTORY = $opt_database || "$dotdir/.netscape/history.db";
>
> If I recall correctly , the dbm subsystem adds the extension itself. Try
> it without the '.db'.
I tried that and it creates a new "Berkeley DB 2.X Hash/Little Endian
(Version 5)" file called "history" (at least that's what 'file' says it
is) and a few lines later I get an error about using an uninitialized
value when I try to use %dist_db. The perlfunc man page says that you
should leave of the .dir or .pag extension if there is one.
> > can't dbmopen /home/mpatten/.netscape/history.db: File exists at
> > /home/mpatten/bin/ggh line 48.
>
> Is Netscape open at the time? You may be getting 'file exists' since it's
> open by Netscape.
No, I didn't even have X running, let alone netscape. (And I checked with
top to double check. I know that sometimes it hangs around.)
> > I recently upgraded from 5.005 to 5.6.0, is dbmopen different?
>
> Do you have an old perl binary lieing around you can try? Are you sure
> your modules are up to date? Did it pass all the tests? The 5.6.0
> release notes indicate that dbm does fail on some non-x86 architectures.
> But the odds of tripping over that bug seem rather remote.
I just checked and found a file called /usr/bin/perl5.00503 so I changed
#!/usr/bin/perl to #!/usr/bin/perl5.00503 and got the same error so I
guess it's nothing new. I had to recompile the extra modules I've added
but the only database module I've added was Mysql. I kept the old modules
after compiling the new version. (I said I wanted to support the old
modules when I compiled it but they didn't work.) Yes, when I compiled
Perl 5.6.0, it passed all the tests when I did 'make test.' My computer is
running on an Intel Pentium so I doubt that that's the problem. The only
module the script calls explicitly is Getopt::Long but I've read that the
'dbmopen' function calls others for what it deems appropriate for the
particular file.
I assumed that all the scripts in the _Perl_Cookbook_ worked with Perl
5.005. I guess it wouldn't have worked with the old version either, at
least on my computer. I think I might have to use 'tie' if I really want
to use this script.
Thanks for the helpful suggestions.
--
Mike Patten <mpatten at exis.net>
More information about the Norfolk-pm
mailing list