Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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"

Comment on installing perl modules from cmd prompt in windows
Download Code
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.
      ikegami,

      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"

        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.

        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/Blah.pm 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.
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
    Try
    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 http://vanillaperl.com/. You can also read about it at the win32.perl.org wiki.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://574034]
Approved by ikegami
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2014-09-21 00:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (165 votes), past polls