Skip Menu |

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

Report information
The Basics
Id: 66039
Status: resolved
Priority: 0/
Queue: Perl-Dist-Strawberry

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

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



Subject: File association / shell extension for v5.12.2.0 are incorrect / incomplete
It appears that the v5.12.2 installer now creates file associations so that in Windows Explorer you can right click a .pl file and select "Execute Perl Program" or "Syntax Check". Unfortunately, if you open a command prompt and attempt to run a perl script, the command line arguments are not passed along to the script. Searching the registry, I find that .pl files are associated as "Perl_program_file" and that the "Execute Perl Program" command is set to "C:\strawberry\perl\bin\perl.exe" %1 At a command prompt if I use ftype to set the Open command as follows: ftype Perl_program_file="C:\strawberry\perl\bin\perl.exe" "%1" %* Then ftype creates the "HKEY_CLASSES_ROOT\Perl_program_file\shell\Open\command" registry key and everything works as expected. So, in future releases could the "HKEY_CLASSES_ROOT\Perl_program_file\shell\Open\command" registry default entry be created as "C:\strawberry\perl\bin\perl.exe" "%1" %* OR could the "HKEY_CLASSES_ROOT\Perl_program_file\shell\Execute Perl Program\command" registry default entry be changed to "C:\strawberry\perl\bin\perl.exe" "%1" %* OR perhaps both ? Thanks for the excellent distribution! Paul
I've been bitten by this too.

Another annoyance with the newer Strawberries is that when I launch "myscript.pl foo" from my text mode file manager (ndn.muxe.com), it launches perl in a separate cmd window. But if I launch "perl myscript.pl foo", it launches perl normally (in the same window). Running the assoc and ftype commands the OP suggested didn't help.
On Thu Feb 24 03:39:32 2011, dandv wrote:
Show quoted text
> Another annoyance with the newer Strawberries is that when I launch
> "myscript.pl foo" from my text mode file manager (ndn.muxe.com), it launches
> perl in a separate cmd window. But if I launch "perl myscript.pl foo", it
> launches perl normally (in the same window). 

The solution to this was to add .PL to the PATHEXT environment variable. Perhaps the Strawberry installer should do that.
On Tue Feb 22 12:28:45 2011, alabamapaul wrote:
Show quoted text
> At a command prompt if I use ftype to set the Open command as follows:
> ftype Perl_program_file="C:\strawberry\perl\bin\perl.exe" "%1" %*
> Then ftype creates the
> "HKEY_CLASSES_ROOT\Perl_program_file\shell\Open\command" registry key
> and everything works
> as expected.

On Windows 7, the `assoc .pl=Perl` and `Perl="C:\strawberry\perl\bin\perl.exe" "%1" %*` did NOT work.

The only way I was able to fix the association was to use a freeware called NirSoft FileTypesMan. It showed that ftype didn't do anything, and the default associations were still in place, including the "Execute" action for Perl being set to `"C:\strawberry\perl\bin\perl.exe" %1` (i.e. not passing the parameters via %*).

Bottom line:
1. The Strawberry installer should set that correctly to "C:\strawberry\perl\bin\perl.exe" "%1" %*
2. Until then, you can use FileTypesMan on Windows 7 to fix the association yourself.
should be fixed in strawberry perl 5.14.2.1