Path: utzoo!utgpu!water!watmath!clyde!rutgers!uwvax!dogie!uwmcsd1!leah!itsgw!steinmetz!uunet!pcrat!rick From: rick@pcrat.UUCP (Rick Richardson) Newsgroups: comp.sources.d Subject: Re: Using perl without "#!" Message-ID: <473@pcrat.UUCP> Date: 22 Feb 88 02:58:25 GMT References: <184@ateng.UUCP> <1291@devvax.JPL.NASA.GOV> <1150@ucsfcca.ucsf.edu> <717@stride.Stride.COM> Reply-To: rick@pcrat.UUCP (Rick Richardson) Organization: PC Research, Inc., Tinton Falls, NJ Lines: 51 In article <717@stride.Stride.COM> mitch@stride.stride.com.UUCP (Thomas Mitchell) writes: > >I agree -- programs which are 'locked' in to any given path are >death. My preference for a default is "/usr/local" and >"/usr/local/lib" as Larry Wall suggests. But go one step >further. > >Select unique environment variables (perhaps: $PERLHOME, >$PERLPATH, $PERLOPTS) test for them and use them if present to >define the location of the binary ($PERLHOME) and if useful a >path ($PERLPATH) to find libraries. $PERLOPTS can be used to >pass the equivalent of command line options. I hate having a zillion environment variables laying around. I hate man(1) not knowing where the man page got stashed. I hate auxilliary files laying around in .../lib. I hate telling people how to setup and/or find the above mentioned stuff. I've been tossing around the idea of using the comment sections of COFF object files (sorry BSD) to store auxilliary files, manual pages, and the like. Then, all you need is the PATH variable set correctly. A build of a program which had an auxilliary file (prog.aux) and a man page (prog.1) would look like this: cc prog.c -o prog coff_comm -a "ManPage1" prog.1 prog # Add comment section coff_comm -a "prog.aux" prog.aux prog # Add comment section To get the man page: coff_comm -x "ManPage1" prog | man # Extract comment section (Of course, suitably disguised for mortals as a shell script). The whole COFF comment package would consist of the aforementioned coff_comm program, plus a library which (hopefully) would allow position independence whether the needed auxilliary files are stashed inside the COFF file, or whether they are laying around somewhere else. I have a prototype of this scheme already. I wonder if there's any net-wide interest? -- Rick Richardson, President, PC Research, Inc. (201) 542-3734 (voice, nights) OR (201) 834-1378 (voice, days) uunet!pcrat!rick (UUCP) rick%pcrat.uucp@uunet.uu.net (INTERNET)