Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

installing perl modules from cmd prompt in windows

by jesuashok (Curate)
on Sep 21, 2006 at 02:46 UTC ( #574034=perlquestion: print w/replies, xml ) Need Help??
jesuashok has asked for the wisdom of the Perl Monks concerning the following question:

cool monks,

I was going through Re^3: SCP connection. I just used the command given there as follows :-

C:\\Perl>perl -MCPAN -e 'shell' install Net::SCP C:\\Perl>perl -MCPAN -e 'shell' install Blah::Blah::Blah
I did not get any message after executing that. is there something wrong in the statement which I executed ?

Generally I use ppm to install perl modules in windows. In curiosity I tried the above commands.

Update:use both the commmands literally.

"Keep pouring your ideas"

Replies are listed 'Best First'.
Re: installing perl modules from cmd prompt in windows
by ikegami (Pope) on Sep 21, 2006 at 02:48 UTC
    In unix, no message means no error. Can you now use the module? If so, nothing's wrong.

      In the title of the node I have mentioned that I am running the above in windows. hope, you would have seen that. I did not get any message after executing that. It returns the prompt silently.

      C:\\Perl>perl -MCPAN -e 'shell' install Blah::Blah
      Is that a valid perl module ?
      Update: I am not able to use the module also

      "Keep pouring your ideas"
        C:\\Perl>perl -MCPAN -e 'shell' install Blah::Blah
        After running that command what happens when you run the following?
        perl -MBlah::Blah -e 'exit'
        If you get a message like "Can't locate Blah/ in @INC ..." then Blah::Blah was not installed. If you get no output at all then it is installed.

        You are running windows. ikegami did mention unix. Probably because he is using unix. I am using unix and have not run the command I gave you on windows because I don't have a windows machine to try it on.

        It is convention in unix that no output means everything worked. That convention carries over to programs that run on other OSes but were developed by people used to the convention.

        Supposedly this convention dates to back before CRTs and LCDs were commonly used as ouput devices on computers. Back then everything that output was printed on paper. It costs more to print "success" than to not print anything so it made economic sense to only print something when there was an error.

        Your OS may be Windows, but Perl and its modules are strongly inspired by unix and the unix way of doing things.

        And sorry, I didn't realize you Blah::Blah::Blah was used literally.

Re: installing perl modules from cmd prompt in windows
by Anonymous Monk on Sep 21, 2006 at 08:40 UTC
    A Guide to Installing Modules, perlrun

    C:\>perl -MO=Deparse -MCPAN -e 'shell' use CPAN; '???'; -e syntax OK C:\>perl -MO=Deparse -MCPAN -e shell use CPAN; shell(); -e syntax OK C:\>perl -MO=Deparse -MCPAN -e "shell" use CPAN; shell(); -e syntax OK C:\>
Re: installing perl modules from cmd prompt in windows
by randyk (Parson) on Sep 21, 2006 at 15:04 UTC
    C:\>perl -MCPAN -e "shell install File::Which" CPAN: Storable loaded ok Going to read C:\Perl\cpan\Metadata Database was generated on Wed, 20 Sep 2006 09:40:02 GMT File::Which is up to date. cpan shell -- CPAN exploration and modules installation (v1.7602) ReadLine support enabled cpan> quit Lockfile removed. C:\>
Re: installing perl modules from cmd prompt in windows
by jfluhmann (Scribe) on Sep 21, 2006 at 19:00 UTC

    Anytime I've installed modules on a Win32 system (not using PPM), I've done the following:

    perl -MCPAN -e"install Blah::Blah"
    or open a shell session via:
    perl -MCPAN -eshell

    Installing via CPAN on a Win32 system works great if you're using Strawberry Perl. You can get a copy from You can also read about it at the wiki.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://574034]
Approved by ikegami
[Discipulus]: ok boring meeting time is arriving.. fortunaltely the boss is in videoconference so i read Le Monde Diplomatique.. see you
[karlgoethebier]: ok no meetings no more. i go to my research kitchen...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (13)
As of 2017-05-24 09:14 GMT
Find Nodes?
    Voting Booth?