Skip Menu |
 

This queue is for tickets about the Perl-Dist-Strawberry CPAN distribution.

Report information
The Basics
Id: 82837
Status: open
Priority: 0/
Queue: Perl-Dist-Strawberry

People
Owner: Nobody in particular
Requestors: matt.hickford [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Scripts (such as Cpan and Perldoc) don't work from MSys Bash
Date: Sun, 20 Jan 2013 21:05:12 +0000
To: bug-Perl-Dist-Strawberry [...] rt.cpan.org
From: Matt Hickford <matt.hickford [...] gmail.com>
Hi. I use MSys' Bash as my shell on Windows, as do many others (it's shipped with Git for Windows). It happens that none of the commands installed with Strawberry Perl such as cpan or perldoc work right: $ cpan sh.exe": /c/strawberry/perl/bin/cpan: /usr/local/bin/perl: bad interpreter: No such file or directory On investigation this is because the file C:\strawberry\perl\bin\cpan begins with the shebang #!/usr/local/bin/perl . This isn't where Strawberry Perl is installed on my computer (it's installed at C:\strawberry\perl\bin\perl.exe ). This *is* a bug in Strawberry Perl, not in MSys. The Windows distributions of other programming languages - Python, Ruby and Nodejs - all solve the problem, albeit in different ways. Ruby carefully writes correct shebang in each script it installs, eg. #!C:/Ruby193/bin/ruby.exe Python builds an .exe for each script installed . Nodejs installs the actual script somewhere else, and in the bin directory installs a shim beginning with the shebang #!/bin/sh . (This works because MSys resolves / to its root directory, so the path to sh is correct) -Matt
Subject: Re: [rt.cpan.org #82837] AutoReply: Scripts (such as Cpan and Perldoc) don't work from MSys Bash
Date: Sun, 20 Jan 2013 21:07:22 +0000
To: bug-Perl-Dist-Strawberry [...] rt.cpan.org
From: Matt Hickford <matt.hickford [...] gmail.com>
Download (untitled) / with headers
text/plain 102b
This is perl 5, version 16, subversion 2 (v5.16.2) built for MSWin32-x86-multi-thread , on Windows 7.
Subject: Re: [rt.cpan.org #82837] Scripts (such as Cpan and Perldoc) don't work from MSys Bash
Date: Sun, 20 Jan 2013 22:32:44 +0100
To: bug-Perl-Dist-Strawberry [...] rt.cpan.org
From: kmx <kmx [...] volny.cz>
Download (untitled) / with headers
text/plain 902b
I understand what's your trouble; however I am afraid that it is not easily fixable: */ after you install any module (e.g. via cpan) shebang line of installed scripts is IMO left as it was in the original distribution see for example: http://cpansearch.perl.org/src/ANDK/CPAN-1.9800/scripts/cpan */ there is no special handling of shebang line on perl@MS Windows (as it is generally ignored) therefore it is left in UNIX form */ patching files bundled with strawberry perl is technically possible but things get more complicated due to relocation in case the user have chosen different installation path than c:\strawberry\ */ patching files bundled with strawberry perl will not be enough as all modules installed afterwards will install their scripts with shebang line you do not like - script installation is handled AFAIK by core modules ExtUtil::MakeMaker and/or Module::Build -- kmx
Subject: Re: [rt.cpan.org #82837] Scripts (such as Cpan and Perldoc) don't work from MSys Bash
Date: Sun, 20 Jan 2013 23:23:26 +0000
To: bug-Perl-Dist-Strawberry [...] rt.cpan.org
From: Matt Hickford <matt.hickford [...] gmail.com>
Download (untitled) / with headers
text/plain 252b
Thanks Kmx. Shucks. I guess shebang fiddling would belong in that bit of installer that writes the cpan.bat and perldoc.bat files . Presumably there's reason why the shebang isn't #!/usr/bin/env perl ? I think that would work on Linux and MSys both.
Subject: Re: [rt.cpan.org #82837] Scripts (such as Cpan and Perldoc) don't work from MSys Bash
Date: Mon, 21 Jan 2013 23:08:58 +0100
To: bug-Perl-Dist-Strawberry [...] rt.cpan.org
From: kmx <kmx [...] volny.cz>
What about: #!perl would it work with msys?
Subject: Re: [rt.cpan.org #82837] Scripts (such as Cpan and Perldoc) don't work from MSys Bash
Date: Mon, 21 Jan 2013 23:05:41 +0000
To: bug-Perl-Dist-Strawberry [...] rt.cpan.org
From: Matt Hickford <matt.hickford [...] gmail.com>
Hi Kmx. Yes #!perl works with MSys.
Subject: Re: [rt.cpan.org #82837] Scripts (such as Cpan and Perldoc) don't work from MSys Bash
Date: Tue, 22 Jan 2013 20:40:41 +0100
To: bug-Perl-Dist-Strawberry [...] rt.cpan.org
From: kmx <kmx [...] volny.cz>
OK, I will try to somehow manage to get all shebang lines to be "#!perl"
fixed in 5.16.2.2 but only for scripts included in straberry perl

I do not know how to tell EU::MM to force "#!perl" as sheband line for all newly installed scripts

--
kmx

Subject: Re: [rt.cpan.org #82837] Scripts (such as Cpan and Perldoc) don't work from MSys Bash
Date: Sun, 24 Feb 2013 22:25:58 +0000
To: "bug-Perl-Dist-Strawberry [...] rt.cpan.org" <bug-Perl-Dist-Strawberry [...] rt.cpan.org>
From: Matt Hickford <matt.hickford [...] gmail.com>
Download (untitled) / with headers
text/plain 352b
Thanks kmx! On 24 Feb 2013, at 21:28, "kmx via RT" <bug-Perl-Dist-Strawberry@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=82837 > > > fixed in 5.16.2.2 but only for scripts included in straberry perl > > I do not know how to tell EU::MM to force "#!perl" as sheband line for all > newly installed scripts > > -- > kmx >


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.