in reply to Re: Installing modules to a remote system (of same platform)...possible? Yes, but...
in thread Installing modules to a remote system (of same platform)...possible? Yes, but...

(Of course you might be able to use ppm directly inside your script, but I don't know if you can integrate calls to it into a script like you can with CPAN.)

All ppm (as most of us know it) is a fancy wrapper for PPM.pm (alt.) much like the CPAN(PLUS) shell, so one just needs to use the module directly if you need to embed in, say, a CGI ...

use PPM; my $ppd = shift; my $dir = 'c:/inetpub/wwwroot/www.foo.com/'; PPM::InstallPackage( package => $ppd, root => $dir, );

Then it's just a matter of slapping use lib 'c:/inetpub/wwwroot/www.foo.com/site/lib'; to the top of all your scripts.

    --k.


  • Comment on Re: Re: Installing modules to a remote system (of same platform)...possible? Yes, but...
  • Download Code

Replies are listed 'Best First'.
Re: Re: Re: Installing modules to a remote system (of same platform)...possible? Yes, but...
by S_Shrum (Pilgrim) on Jun 19, 2002 at 05:15 UTC

    Okay, I'm game.

    I created a script called 'install_mods.pl' and placed in it the following code:

    use PPM; print "Content-type: text/html\n\n"; BEGIN { use CGI::Carp qw(carpout); carpout(\*LOGGY) if open(LOGGY,'>>'.__FILE__.'.err.log'); } my $ppd = 'd:/html/users/shrumnet/html/cgi-bin/modules/DBI.ppd'; my $dir = 'd:/html/users/shrumnet/html/cgi-bin/library'; print "Installing [<b>$ppd</b>] to [<b>$dir</b>]"; PPM::InstallPackage( package => $ppd, root => $dir, );

    However, this does nothing (no files are written in the /library folder. Additionally, the error log file gets created and in it resides nothing (which is odd as the error log shouldn't get created unless there was an error to write).

    Any suggestions?

    ======================
    Sean Shrum
    http://www.shrum.net

Re: Re: Re: Installing modules to a remote system (of same platform)...possible? Yes, but...
by S_Shrum (Pilgrim) on Jun 19, 2002 at 06:22 UTC

    BTW...

    I also tried: 'my $ppd = 'HTTP://www.ActiveState.com/packages/DBI.ppd';

    ======================
    Sean Shrum
    http://www.shrum.net