Uli Wortmann writes:
 > getcwd is on of those functions which are os-dependend. As suggested,
 > in an earlier mail, l2h should use the posix defs, which among other
 > functions, define a getcwd-cmd.  What happens if you use
 > 
 >      use Posix

  It fails miserably:

latex2html -init_file /home/fdrake/projects/python/Python-1-5/Doc/perl/l2hinit.perl   
/home/fdrake/projects/python/Python-1-5/Doc/api/api.tex

initialising with file: 
/home/fdrake/projects/python/Python-1-5/Doc/perl/l2hinit.perlCan't locate Posix.pm in 
@INC (@INC contains: /depot/sundry/latex2html-98.1p4 /depot/gnu/plat/lib/perl5/5.00403 
/depot/gnu/lib/perl5 /depot/gnu/plat/lib/perl5/site_perl 
/depot/gnu/lib/perl5/site_perl . /home/fdrake) at 
/home/fdrake/projects/python/Python-1-5/Doc/perl/l2hinit.perl line 12.
BEGIN failed--compilation aborted at 
/home/fdrake/projects/python/Python-1-5/Doc/perl/l2hinit.perl line 12.

If instead I say "use POSIX", I get this:

latex2html -init_file /home/fdrake/projects/python/Python-1-5/Doc/perl/l2hinit.perl   
/home/fdrake/projects/python/Python-1-5/Doc/api/api.tex

initialising with file: 
/home/fdrake/projects/python/Python-1-5/Doc/perl/l2hinit.perlPrototype mismatch: sub 
Override::getenv ($) vs none at /depot/gnu/plat/lib/perl5/5.00403/POSIX.pm line 0
Usage: POSIX::getcwd() at /depot/sundry/latex2html-98.1p4/Override.pm line 177

  Changing the calls to getcwd() in Override.pm at line 177 & 179 to
getcwd() instead of &getcwd fixes this problem, but requires that I
change Override.pm.  It also doesn't work for exactly the same reason
the version defined in Override.pm doesn't work; `pwd` doesn't seem to 
acknowledge directory changes.  I've described this in previous
notes.
  From looking at the camel book, the version in the Cwd module should 
be sufficient on all platforms and works with the existing code in
latex2html; the problem is that Override.pm overrides it.  Simply
removing the definition in Override.pm makes things work.  This seems
to be the most portable and simplest fix.  Is there a platform for
which Cwd::getcwd() isn't a working version of getcwd()?


  -Fred

--
Fred L. Drake, Jr.
[EMAIL PROTECTED]
Corporation for National Research Initiatives
1895 Preston White Drive    Reston, VA  20191

Reply via email to