Re: utils/perldoc.Com vs utils/perldoc

2013-09-19 Thread John E. Malmberg

On 9/19/2013 1:36 PM, Nicholas Clark wrote:


If I delete the perldoc.com, I get this:

$ perldoc
Can't open perl script perl_root:[utils]perldoc.com: no such file or directory
%SYSTEM-F-ABORT, abort


(mail client may wrape the line)
LION show sym perldoc
  PERLDOC == $PERL_ROOT:[00]PERL.EXE perl_root:[utils]perldoc.com 
-t


The install/setup procedure creates a set of foreign commands similar to 
Bash aliases.


Attempting to run perldoc.com by it self fails as it does not like its 
name.  It looks like it is set up to only be run as a parameter to perl.


The .com suffix was apparently added for some reason, but running the 
com procedure directly just says not to run it that way in so many 
words.  So that is a bit confusing to me.


To make things run under GNV Bash some helper scripts can be used, 
assuming that the logical name PERL_ROOT is set up.


BASH-4.2$ cat /usr/bin/perl
#! /bin/sh
/perl_root/perl $*
BASH-4.2$ cat /usr/bin/perldoc
#! /bin/sh
perl /perl_root/utils/perldoc.com -t $*
BASH-4.2$
BASH-4.2$ perldoc -t
Usage: perldoc.com [-hVriDtumFXlT] [-n nroffer_program]
[-d output_filename] [-o output_format] [-M FormatterModule]
[-w formatter_option:option_value] [-L translation_code]
PageName|ModuleName|ProgramName

Examples:

perldoc.com -f PerlFunc
perldoc.com -q FAQKeywords
perldoc.com -v PerlVar

The -h option prints more help.  Also try perldoc.com perldoc to get
acquainted with the system.[Perldoc v3.19]


So, my question is, surely that file should be installed as
utils/perldoc.COM not utils/perldoc?
And if so, where in ExtUtils::MakeMaker does it need fixing?

(Does anyone on VMS actually install modules from CPAN that have scripts?)


I do not know.

Regards,
-John
malmberg@encompasserve.organization
Personal Opinion Only



Re: utils/perldoc.Com vs utils/perldoc

2013-09-19 Thread Craig A. Berry

On Sep 19, 2013, at 1:36 PM, Nicholas Clark n...@ccl4.org wrote:

 So, my question is, surely that file should be installed as
 utils/perldoc.COM not utils/perldoc?

Yes.

 And if so, where in ExtUtils::MakeMaker does it need fixing?

Good question.  ExtUtils::MakeMaker::MM_Unix::installbin says:

=item installbin (o)

Defines targets to make and to install EXE_FILES.

but I think it's lying.  It doesn't seem to make anything at all but mostly 
copies files into place after fiddling with the shebang line.  I think there is 
also some special handling if it finds POD in the file.  I suppose the file 
copy line in there should append .com if it's not already present.

 (Does anyone on VMS actually install modules from CPAN that have scripts?)

Probably rarely.  And installing it wouldn't let you run it automatically 
anyway unless you happen to put perl_root:[utils] into DCL$PATH.  The reason 
you had it still looking for perldoc.com even after you deleted that file is 
because there is a foreign command for perldoc defined in perl_setup.com (more 
or less like an alias as John said).



Craig A. Berry
mailto:craigbe...@mac.com

... getting out of a sonnet is much more
 difficult than getting in.
 Brad Leithauser