mhonarc-users

MHonArc: Require mystery on Windows machines

1996-12-26 16:26:19
I received te following message from Daniel Mocsny about require
problems under Win95 and Perl 5.001m.  Before I consider
incorporating the work-around he provides, can anyone confirm
if the problem persists under later versions of Perl?

        --ewh

------- Forwarded Message

From:    Daniel Mocsny <dmocsny(_at_)mfm(_dot_)com>
Subject: Possible Bug in MHonArc under Win95/NT Perl 5.001?
Date:    Thu, 19 Dec 1996 02:33:19 EST
Organization: MFM Communication Software
- -----------

Hello Earl,

Thank you for publishing your Internet mail-to-HTML converter. I have
had generally good luck running MHonArc 1.2.3 on both BSDI UNIX and 
Windows 95. However, I stumbled across a possible bug with respect 
to the version of WinNT Perl 5.001 I am using. I am running MHonArc 
with these command lines:

E:\PERL\PERL.EXE H:\MHONAR2\MHONARC -rcfile H:\MHONARC\mfm.rc -savemem -outdir 
J:\mfm\archive J:\mfm\mfm.9509
E:\PERL\PERL.EXE H:\MHONAR2\MHONARC -rcfile H:\MHONARC\mfm.rc -add -savemem -ou
tdir J:\mfm\archive J:\mfm\mfm.9510
(etc.)

Analogous commands were working fine under UNIX, except that I
was dumping core (apparently) from running out of memory after
processing something over 3000 messages. So I tried running MHonArc
on my Win95 computer, where (ironically) I know I can run larger
Perl jobs. I got a strange error message from the second (and
following) runs of MHONARC:

ERROR: Database read error of J:\mfm\archive\mhonarc.db:
  Can't locate J:\mfm\archive\mhonarc.db in @INC at (eval 5) line 1.

I looked in the MHonArc source and found the error around line 190.
I'm attaching my workaround for your information. The problem is that
the require() call doesn't like having an explicit path in Win95/NT
Perl 5.001. I worked around this problem by pushing $OUTDIR onto @INC
and calling require() with only the $DBFILE.


        $DBFILE = ".mail2html.db"
            unless (-e "${OUTDIR}${DIRSEP}${DBFILE}") ||
                   (!-e "${OUTDIR}${DIRSEP}.mail2html.db");
        if (-e "${OUTDIR}${DIRSEP}${DBFILE}") {
   # DJM Change, Thursday, Dec. 19, 1996. MHonArc appears to have a
   # "bug" under MS-DOS (WinNT Perl 5.001): the require doesn't want to
   # work when we supply a full path name with a drive letter that
   # differs from where MHonArc is running. I don't know exactly what
   # require() dislikes about the full path. However, this is easy to
   # fix by pushing the ${OUTDIR} onto the @INC list and calling
   # require() without the explicit path.
#           eval q%require "${OUTDIR}${DIRSEP}${DBFILE}"%;
       push(@INC, $OUTDIR);
            eval(require($DBFILE));


- -- 
- --- Daniel J. Mocsny: mailto:dmocsny(_at_)mfm(_dot_)com
- --- Home page:  http://www.mfm.com/~dmocsny
- --- MFM Communication Software, Inc.: http://www.mfm.com
- --- Discover, Document, Delegate.


------- End of Forwarded Message

<Prev in Thread] Current Thread [Next in Thread>
  • MHonArc: Require mystery on Windows machines, Earl Hood <=