Subject: | %~dp0 on cpanm.bat |
On Windows Vista, just after downloading the portable version
(strawberry-perl-5.12.3.0-portable.zip - May 2011) I've attemped to use
cpanminus, as sugested at http://www.cpan.org/modules/INSTALL.html.
I've installed it through command 'cpan App::cpanminus', and it seems to
install ok. But when try to use it I receive the following message:
C:\MyFolder\Portable\PortableApps\gVimPortable>cpanm
'"C:\MyFolder\Portable\PortableApps\strawberry-perl-5.12.3.0-portable\perl\site\bin\perl.exe"'
is not recognized as an internal or
external command,
operable program or batch file.
You do not have Perl in your PATH.
But it seems that I do have perl in my path:
C:\MyFolder\Portable\PortableApps\gVimPortable>perl -v
This is perl 5, version 12, subversion 3 (v5.12.3) built for
MSWin32-x86-multi-thread
:
:
I've managed to solve the issue, by replacing 2 lines at
strawberry-perl-5.12.3.0-portable\perl\site\bin\cpanm.bat:
"%~dp0perl.exe" -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9
with
"perl.exe" -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9
and
"%~dp0perl.exe" -x -S %0 %*
with
"perl.exe" -x -S %0 %*
I've performed a search on perl installation and there are around 150
similar
lines, but on .bat files that show no problem as they are on perl\bin
folder,
which contains the perl.exe (%~dp0 means the directory where the batch
file is
stored).
I was wondering if it is possible to change the cpanm.bat file that is
shipped
with strawberry perl portable.
Thanks,
mMont