Anyone come across a better method for achieving the same effect?package RemoteModule; =item Copyright 2004 John Drago <john.drago@e-commedia.com> This software is free software and may be distributed under the same terms as perl itself, so long as this copyright notice is included. Dependancies: LWP::UserAgent HTTP::Request::Common Synopsis: use RemoteModule "Crypt::RC4" => "http://search.cpan.org/src/S +IFUKURT/Crypt-RC4-2.02/RC4.pm"; use Crypt::RC4; my $crypted = RC4("secret password!!!", "Text to be encrypted!"); print "Encrypted: $crypted\n"; print "Decrypted: " . RC4( "secret password!!!", $crypted ); =cut use strict; my %urls = (); #======================================================== # #======================================================== sub import { my ($s) = shift; my ($class,$url) = @_; $urls{$class} = $url; }# end BEGIN{} #======================================================== # #======================================================== BEGIN { push @INC, sub { my ( $coderef, $filename ) = @_; $filename =~ s/\//::/g; $filename =~ s/\.pm$//; return undef unless defined $urls{$filename}; open my $fh, "perl " . " -MHTTP::Request::Common " . " -MLWP::UserAgent " . " -e \"print LWP::UserAgent->new->request( " . " GET '$urls{$filename}' " . " )->content\" | "; return $fh; }; }# end BEGIN 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using Remote Modules over HTTP
by tilly (Archbishop) on Feb 21, 2004 at 03:25 UTC | |
|
Re: Using Remote Modules over HTTP
by Mr. Muskrat (Canon) on Feb 21, 2004 at 01:52 UTC | |
|
Re: Using Remote Modules over HTTP
by fizbin (Chaplain) on Feb 22, 2004 at 05:04 UTC | |
|
Re: Using Remote Modules over HTTP
by The Mad Hatter (Priest) on Feb 21, 2004 at 01:22 UTC | |
|
Re: Using Remote Modules over HTTP
by atcroft (Abbot) on Feb 21, 2004 at 01:09 UTC | |
by exussum0 (Vicar) on Feb 21, 2004 at 03:16 UTC |