On Wed, 3 Apr 2002, PK Eidesis wrote:

> Chris Devers wrote:
> 
> if I rename HEAD to lwp-head, then won't other Perl programs that depend
> upon HEAD break? They will be looking for HEAD which is now lwp-head.

Maybe, but I wouldn't worry about it. LWP's HEAD is an optional program
that Perl developers shouldn't rely upon -- it's just a throw-in that can
make some command line stuff easier. 

If you look at the source, it should be a short little script that just
calls $lwp->head( $url ) [or something to that effect]. If someone wants
to put that functionality in a program, it's more efficient & reliable to
just put that statement in directly, rather than depending on the user to
have installed this little helper program (with the right name, in the
right directory, set as executable, etc). To hell with all that, just have
you script "use LWP; my $lwp = new LWP; my $head = $lwp->head( $url )" or
whatever and be done with it. :)

LWP just offers HEAD as a freebie /slash/ demo of how to use the library,
but most users can get the same result with "lynx --head $site" or opening
up "telnet $site 80\n\nHEAD\n\n", and Perl scripts should never rely on
HEAD being available or mandatory. There's always a better alternative, at
least in practice. 

> In a case of a rarer condition, if there are any HFS-style case-blind
> applications that might want to call head, they will end up calling
> HEAD. 

....and get the LWP program when they wanted the stream filter. This is a
much more likely & broken problem.  


-- 
Chris Devers                                [EMAIL PROTECTED]
Apache / mod_perl / http://homepage.mac.com/chdevers/resume/

"More war soon. You know how it is."    -- mnftiu.cc

Reply via email to