Installing modules using Strawberry Perl

89,423

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.

Share:
89,423
Admin
Author by

Admin

Updated on July 05, 2022

Comments

  • Admin
    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
    Damien Leroux almost 13 years
    "cpan" is shorter than "perl -MCPAN -e shell"
  • Alex
    Alex almost 13 years
    well, yes, but I like to be able to check perl -v first to know which Perl I'm running.
  • Asam Padeh
    Asam Padeh about 11 years
    As Alex said, it works fine with: cd Module-Name-1.23 perl Makefile.PL dmake dmake test dmake install dmake is a make program that happens to run pretty well on Windows, as described here.
  • Kai Carver
    Kai Carver over 10 years
    you can do it in one line: cpan Quantum::Entanglement
  • Kai Carver
    Kai Carver over 10 years
    also you can use cpanm instead of cpan. cpanm might be better if you are new to this, as it has less messages and configuration.
  • gsinha
    gsinha over 9 years
    On Windows 7, Start Menu > Strawberry Perl > Tools > CPAN Client
  • Joel G Mathew
    Joel G Mathew about 9 years
    On Windows 8.1, Start>Cpan Client
  • Paul Bußmann
    Paul Bußmann about 8 years
    On Windows 10, Start Menu > All Apps > Strawberry Perl > CPAN Client
  • Wolf
    Wolf about 7 years
    The You may need to make sure [...] considerations only apply to the second version, right?
  • Ed.
    Ed. over 6 years
    No, it applies to both.
  • Wes
    Wes over 2 years
    Strawberry Perl has deprecated dmake, and you should use gmake instead.