]> granicus.if.org Git - python/commitdiff
Somewhat more direct way of locating the file, using __FILE__.
authorFred Drake <fdrake@acm.org>
Wed, 11 Mar 1998 12:08:21 +0000 (12:08 +0000)
committerFred Drake <fdrake@acm.org>
Wed, 11 Mar 1998 12:08:21 +0000 (12:08 +0000)
Leave find_my_file() around for now, even though we're not using it at the
moment.

Doc/perl/l2hinit.perl

index 96146e911d77ed9b18a484bb5d298abaaafcd169..75c39a88bee21408a5ce3d49a6b6d7b89fea954d 100644 (file)
@@ -34,11 +34,16 @@ sub find_my_file{
     $mydir;
 }
 
+
 # A little painful, but lets us clean up the top level directory a little,
 # and not be tied to the current directory (as far as I can tell).
 #
-$mydir = &find_my_file("l2hinit.perl");
-#print "\nmy dir = $mydir\n";
+use Cwd;
+use File::Basename;
+($myname, $mydir, $myext) = fileparse(__FILE__, '\..*');
+chop $mydir;                   # remove trailing '/'
+$mydir = getcwd() . "$dd$mydir"
+  unless $mydir =~ s|^/|/|;
 $LATEX2HTMLSTYLES = "$mydir$envkey$LATEX2HTMLSTYLES";