develooper Front page | perl.perl5.porters | Postings from September 2013

does Win32 install .pl files *and* .bat files

Thread Next
From:
Nicholas Clark
Date:
September 20, 2013 13:35
Subject:
does Win32 install .pl files *and* .bat files
Message ID:
20130920133459.GQ66035@plum.flirble.org
If a CPAN distribution contains a script, such as Pod::Perldoc contains
perldoc, or Digest-SHA contains shasum, what does Win32 actually install?

In that, as best I can tell, on all platforms the makefile copies the script
to the $(INST_SCRIPT) directory, and then runs the $(FIXIN) command:

$(INST_SCRIPT)/shasum : shasum $(FIRST_MAKEFILE) $(INST_SCRIPT)$(DFSEP).exists $(INST_BIN)$(DFSEP).exists
	$(NOECHO) $(RM_F) $(INST_SCRIPT)/shasum
	$(CP) shasum $(INST_SCRIPT)/shasum
	$(FIXIN) $(INST_SCRIPT)/shasum
	-$(NOECHO) $(CHMOD) $(PERM_RWX) $(INST_SCRIPT)/shasum


On *nix the FIXIN command is this

FIXIN = $(ABSPERLRUN) -MExtUtils::MY -e 'MY->fixin(shift)' --

and on VMS just the quoting differs:

FIXIN = $(ABSPERLRUN) "-MExtUtils::MY" -e "MY->fixin(shift)" "--"

MY->fixin calls the fixin() method, which uses $Config{startperl} to change
the #! line

However, the filename is unchanged.


On Win32, the FIXIN command appears to be this:

FIXIN = $(PERLRUN) ../../win32/bin/pl2bat.pl


As best I can tell, in the case pl2bat.pl would create a shasum.bat file
within $(INST_SCRIPT)

As far as the perl core goes, I believe that ./installperl will *only*
install shasum.bat

However, if one builds Digest::SHA (or Pod::Perldoc, or anything else) from
a tarball, does it end up with both shasum and shasum.bat being installed?

Basically, the entire contents of $(INST_SCRIPT) being copied?

I'd like to know, because VMS isn't consistent with this, and getting a couple
more things consistent would permit a bunch of simplification of the core
build process.

Nicholas Clark

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About