in reply to a require statement problem

There is, of course, an obscure and for good reason not well used path, but you can (ab)use the use lib statement to load code from wherever you want. The interesting part of this will of course be error checking and error recovery.

To give credit, where credit is due, I picked up this idea from one of Abigails JAPHs (sadly, Abigail is not currently with us).

Here's Abigails JAPH :

use lib sub {($\) = split /\./ => pop; print $"}; eval "use Just" || eval "use another" || eval "use Perl" || eval "use +Hacker";

Now what you would need to do is to use LWP; and your use lib sub would issue an LWP::GET request to whatever URL you want. Maybe there already is a module on CPAN for this, most likely in the ACME:: namespace.

Replies are listed 'Best First'.
Re: Re: a require statement problem
by $code or die (Deacon) on Aug 28, 2001 at 16:08 UTC
    There is a module on CPAN. It's by Abigail and it's called The::Net.

    See this node where the code is also posted.

    Error: Keyboard not attached. Press F1 to continue.

    Update: Updated link to The::Net