1

After extracting a fresh copy of Strawberry Perl, I get an error in CPANM.

C:\portable_perl>cpanm --self-upgrade
You are running cpanm from the path where your current perl won't install execut
ables to.
Because of that, cpanm --self-upgrade won't upgrade the version of cpanm you're
running.

  cpanm path   : C:\portable_perl\perl\bin/cpanm
  Install path : C:\portable_perl\perl\site\bin

It means you either installed cpanm globally with system perl, or use distro pac
kages such
as rpm or apt-get, and you have to use them again to upgrade cpanm.

C:\portable_perl>

After installing App::cpanminus I get a slightly different error.

C:\portable_perl>cpanm --self-upgrade
You are running cpanm from the path where your current perl won't install executables to.
Because of that, cpanm --self-upgrade won't upgrade the version of cpanm you're running.

  cpanm path   : C:\portable_perl\perl\site\bin/cpanm
  Install path : C:\portable_perl\perl\site\bin

It means you either installed cpanm globally with system perl, or use distro packages such
as rpm or apt-get, and you have to use them again to upgrade cpanm.

C:\portable_perl>

Is there any way to set the path? Or install CPANM differently? I'm running this on Windows 7 x64 if that matters.

Eric Fossum
  • 2,395
  • 4
  • 26
  • 50

1 Answers1

0

The script does

$0 !~ /^$install_base/

where $0 is

C:\portable_perl\perl\site\bin/cpanm

and $install_base is

C:\portable_perl\perl\site\bin

It's not expecting backslashes. \po, \pe, \s and \b all have special meaning in regex patterns. This is a bug in cpanm.

ikegami
  • 367,544
  • 15
  • 269
  • 518