NAME
Acme::RemoteINC - Slowest Possible Module Loading
DESCRIPTION
For your SlowCGI pleasure, loads perl modules via FTP from remote sites. Plase don thick rubber gloves and consider version and binary XS module compatibility before using. Requires Perl 5.8 or greater.
(IR)RATIONALE
Who do you want to kid today? A paranoid ISP admin who won't let you load your favorite CPAN module on his system? Yourself, for considering this as a valid solution to a social problem like that one?
SYNOPSIS
use strict;
use warnings;
use DBI; # load local DBI by default
use DBD::Esoterica; # if cannot load locally, will try the FTP method
...etc.
BEGIN {
require Acme::RemoteINC;
my $rinc = new Acme::RemoteINC(
host => 'ftp.esoteric-perl.com',
user => 'anonymous',
password => 'pwd@myhost.com',
perl_root => '/usr/lib/perl5/site_perl/5.8.1'
);
}
METHODS
- new
-
my $rinc = new Acme::RemoteINC( host => 'ftp.myserver.com', user => 'anonymous', password => 'pwd@myhost.com', perl_root => '/usr/lib/perl5/site_perl' ); or my $ftp = new Net::FTP; ... my $rinc = Acme::RemoteINC->new(ftp => $ftp); push $rinc, @INC if($rinc); The new method creates a new Acme::RemoteINC object. Three paired hash entry named arguments are required for new: host => $hostname The name of the ftp server. user => $loginname Login user name. password => $pwd Login password. Two paired hash entry named arguments are optional arguments for new: perl_root => $wdir Perl module directory name relative to the FTP service root. Defaults to the default ftp service's base working directory. ftp => $ftp When given as an argument, this overrides use of the other arguments. ftp is then expected to be a Net::FTP object which has already been logged in and pointed to the proper Perl root library directory.
NOTE: It is advisable that the call to new be done in a BEGIN block. It is also advisable to load Acme::RemoteINC via require in the BEGIN block.
- INC
-
This method is used by the use and require directives after the reference to the Acme::RemoteINC object has been placed in @INC. For details, see the perlfunc docs for require.
BUGS
This code is beyond bugs. Here there be monsters. The entire concept of
loading modules via hooks to Net::FTP may well be fatally flawed. Enjoy :).
SEE ALSO
Acme::Everything Net::FTP Tie::FTP
TODO
perl_root should also accept an array ref to a list of directories.
AUTHOR
William Herrera (wherrera@skylightview.com)
SUPPORT
Rude noises, questions, feature requests and inquiries regarding the
mental state required to upload code this slow are referred to the
Acme, Incorporated Perl suggestion box (thanks@dev.null).
COPYRIGHT
Copyright (C) 2004 William Hererra. All Rights Reserved.
This module is free software; you can redistribute it and/or mutilate it
under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 120:
You forgot a '=back' before '=head1'