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;
In reply to Using Remote Modules over HTTP by jdrago_999
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |