Latest version (which works perfectly for modules like CPAN and Yahoo::Search) but is chucking up blood for GD.pm (although, I think, not due to my code):
#! /usr/bin/perl -w use strict; use CGI; use CGI::Carp qw(fatalsToBrowser); use CPAN; use CPAN::Config; my $query = new CGI; my $update = $query->url_param('update'); my $moduleparam = $query->url_param('module'); if ($update) { for my $key (keys %{$CPAN::Config}) { $CPAN::Config->{$key} = $query->param($key) unless grep($key e +q $_, qw[dontload_hash urllist wait_list]); } } else { $CPAN::Config->{'build_dir'} = q[EDITED FOR SECURITY PURPOSES]; $CPAN::Config->{'cpan_home'} = q[EDITED FOR SECURITY PURPOSES]; $CPAN::Config->{'histfile'} = q[EDITED FOR SECURITY PURPOSES]; $CPAN::Config->{'keep_source_where'} = q[EDITED FOR SECURITY PURPO +SES]; $CPAN::Config->{'make_install_arg'} = q[]; $CPAN::Config->{'makepl_arg'} = q[PREFIX=EDITED FOR SECURITY PURPO +SES SITELIBEXP=EDITED FOR SECURITY PURPOSES LIB=EDITED FOR SECURITY P +URPOSES INSTALLMAN1DIR=EDITED FOR SECURITY PURPOSES INSTALLMAN3DIR=ED +ITED FOR SECURITY PURPOSES INSTALLSITEMAN1DIR=EDITED FOR SECURITY PUR +POSES INSTALLSITEMAN3DIR=EDITED FOR SECURITY PURPOSES]; } print $query->header(); printf '<h2>CGI CPAN Module Installer</h2><h3>CPAN Configuration (CPAN +::Config)</h3><form action="%s?update=1&module=%s" method="post"><tab +le border="0" cellpadding="3" cellspacing="0">', $query->url(-relativ +e=>1), $moduleparam; for my $key (sort keys %{$CPAN::Config}) { printf '<tr><td align="right"><label for="%s">%s</label></td><td>< +input type="text" name="%s" value="%s" size="75" /></td></tr>', $key, + $key, $key, $CPAN::Config->{$key} unless grep($key eq $_, qw[dontloa +d_hash urllist wait_list]); } print '<tr><td colspan="2" align="right"><input type="submit" value="r +un again" /></td></tr></table></form>'; if ($moduleparam) { print '<p /><h3>Working...</h3><textarea cols="76" rows="25">'; my $module = CPAN::Shell->expand('Module',$moduleparam); $module->install; print '</textarea><p />'; } print '<strong>finished</strong>';

In reply to Re: Remotely install modules by indiansummersky
in thread Remotely install modules by indiansummersky

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.