Installing modules using Strawberry Perl
Solution 1
You can still use ppm
, but it is not recommended. Run CPAN client from the Strawberry Perl or Strawberry Perl (64-bit), sub folder Tools, entry in the Start menu.
Type install Module::Name
there.
Solution 2
As Alexandr says, you can use the CPAN client via the start menu. You can also install modules just as you would on Unix from the DOS window:
perl -MCPAN -e shell
install Quantum::Entanglement
You can also download the .tar.gz from CPAN, unzip it and install as you would in Unix:
cd Module-Name-1.23
perl Makefile.PL
dmake
dmake test
dmake install
You may need to make sure your %PATH% environment variable has the right entry to get to Strawberry Perl, and does not contain other copies of dmake or gcc, which will sometimes lead to headaches.
Solution 3
Change the directory:
cd C:\Strawberry\perl\bin
Then
C:\Strawberry\perl\bin>cpan Lingua::EN::Sentence
and the module will install automatically.
Solution 4
CPAN is the easiest installation method.
As Alex has noted, you may have to download a .tar.gz and unzip it. Since he wrote his answer, Strawberry Perl has deprecated dmake, and you should use gmake instead.
Admin
Updated on July 05, 2022Comments
-
Admin almost 2 years
Until now I used ActiveState's ActivePerl, and used the ppm for installing modules.
Last week I moved to Strawberry Perl, but I don't know how I should install modules using Strawberry Perl. What is some information on how module installation is done using Strawberry Perl or is there some link on how to install new modules?
-
Damien Leroux almost 13 years"cpan" is shorter than "perl -MCPAN -e shell"
-
Alex almost 13 yearswell, yes, but I like to be able to check perl -v first to know which Perl I'm running.
-
Asam Padeh about 11 yearsAs Alex said, it works fine with: cd Module-Name-1.23 perl Makefile.PL dmake dmake test dmake install
dmake
is amake
program that happens to run pretty well on Windows, as described here. -
Kai Carver over 10 yearsyou can do it in one line:
cpan Quantum::Entanglement
-
Kai Carver over 10 yearsalso you can use
cpanm
instead ofcpan
.cpanm
might be better if you are new to this, as it has less messages and configuration. -
gsinha over 9 yearsOn Windows 7,
Start Menu > Strawberry Perl > Tools > CPAN Client
-
Joel G Mathew about 9 yearsOn Windows 8.1,
Start>Cpan Client
-
Paul Bußmann about 8 yearsOn Windows 10, Start Menu > All Apps > Strawberry Perl > CPAN Client
-
Wolf about 7 yearsThe
You may need to make sure [...]
considerations only apply to the second version, right? -
Ed. over 6 yearsNo, it applies to both.
-
Wes over 2 yearsStrawberry Perl has deprecated
dmake
, and you should usegmake
instead.