Re: Installing MLDBM::Sync, prerequisite to Apache::ASP

[email protected] (Craig Berry)
Newsgroups perl.vmsperl
Message-ID <[email protected]>
 
On Tuesday, October 14, 2008, at 08:41AM, "Vorländer, Martin" <[email protected]> wrote:
>Hi everybody!
>
>Has anybody here tried to install Apache::ASP with HP's 5.8.6 distribution?
>
>As far as I can see, it tries to use MLDBM for (state data) storage,
>wrapped in MLDBM::Sync for multi-process access. And that one is too
>unixy for VMS, I suppose (it uses flock(), and generates lots of errors
>during MMS TEST, naturally).
>
>Any hints?

I haven't tried what you're doing, but Perl 5.10 on VMS 8.3 or later supports flock() via emulation using the locking flags of fcntl().  That's probably the only way this would have a prayer of working out of the box.

There is also always the traditional answer to the question, "How do you lock a file on VMS?"  Answer: "Open it.'  That can be made as explicit as you like with:

my $fh = VMS::Stdio::vmsopen('file.dat', 'shr=nil');

If you're not having enough fun yet you could try writing your own MLDBM::Sync that subclasses VMS::IndexedFile and uses RMS record locks, but I'm not at all sure you get fine enough control of record-level locking that way.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.