Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Been there, done that. The following code is available on CPAN, as the package The::Net. It "overloads" require such that you can give it an http or ftp URL, and it will fetch the module for you using LWP.

-- Abigail

package The::Net; # # $Id: Net.pm,v 1.1 2001/04/29 04:22:11 abigail Exp abigail $ # # $Log: Net.pm,v $ # Revision 1.1 2001/04/29 04:22:11 abigail # Initial revision # # use warnings 'all'; use strict; use vars qw /$VERSION/; ($VERSION) =~ q $Revision: 1.1 $ =~ /([\d.]+)/; push @INC => sub { require LWP::Simple; require IO::File; require Fcntl; my $url = pop; return unless $url =~ m{^\w+://}; my $document = LWP::Simple::get ($url) or die "Failed to fetch $ur +l: $!\n"; my $fh = IO::File -> new_tmpfile or die "Failed to create temp fil +e: $!\n"; $fh -> print ($document) or die "Failed to print: $!\n"; $fh -> seek (0, Fcntl::SEEK_SET()) or die "Failed to seek: $!\n"; $fh; }; 1; __END__ =head1 NAME The::Net -- Use the Net to fetch your required modules. =head1 SYNOPSIS use The::Net; require 'http://www.example.com/Module.pm'; =head1 DESCRIPTION By using The::Net, you enable C<require> to fetch Modules using HTTP or FTP, when given a URL as argument. =head1 REVISION HISTORY $Log: Net.pm,v $ Revision 1.1 2001/04/29 04:22:11 abigail Initial revision =head1 AUTHOR This package was written by Abigail, abigail@foad.org. =head1 COPYRIGHT and LICENSE This package is copyright 2001 by Abigail. Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the "Softwar +e"), to deal in the Software without restriction, including without limitat +ion the rights to use, copy, modify, merge, publish, distribute, sublicens +e, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be include +d in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRES +S OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILIT +Y, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHAL +L THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. =cut

In reply to Re: The Future - Managing Modules by Abigail
in thread The Future - Managing Modules by John M. Dlugosz

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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others lurking in the Monastery: (12)
    As of 2014-09-19 09:14 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      How do you remember the number of days in each month?











      Results (133 votes), past polls