The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

URL::Grab - Perl extension for blah blah blah

SYNOPSIS

use URL::Grab;
my $cnt_hsh;

# IMPORTANT note (see also #32434):
# Please note, that URL::Grab doesn't return you the content itself as a
# scalar, but instead, returns a hash-reference. The keys of the
# hash are the URLs.

$cnt_hsh = $urlgrabber->grab('http://google.at');

# The content then is available in $cnt_hsh->{'http://google.at'}->{'http://google.at'}.
# Sorry, this is a design issue, that cannot be changed any more :-)
# If you are fetching only one URL, you would better use grab_single!

$cnt_hsh = $urlgrabber->grab(qw(http://google.at));
$cnt_hsh = $urlgrabber->grab([ qw(http://google.at http://asdf.org) ]);
$cnt_hsh = $urlgrabber->grab([ qw(http://google.at http://asdf.org) ], 'http://perl.com');

$cnt_hsh = $urlgrabber->grab_mirrorlist(
  'http://linux.duke.edu/projects/yum/',
  [qw(http://www.netfilter.org http://www.at.netfilter.org)]
);

# Please note, the following example will return only *one* hash-reference - it will use the
# first that works!!!
$cnt_hsh = $urlgrabber->grab_mirrorlist([qw(
   http://www.netfilter.org http://www.at.netfilter.org
)]);

$cnt_hsh = $urlgrabber->grab_mirrorlist([qw(
  ftp://linux-kernel.at/packages/yum.conf2
  http://filelister.linux-kernel.at/downloads/packages/yum.conf
)]);

$cnt_hsh = $urlgrabber->grab_mirrorlist(
  'ftp://linux-kernel.at/packages/yum.conf'
);

$cnt_hsh = $urlgrabber->grab_mirrorlist([qw(
  /etc/yum.conf
  ftp://linux-kernel.at/packages/yum.conf
)]);

DESCRIPTION

URL::Grab is a perl module that drastically simplifies the fetching of files from within a local source (eg. local filesystem) and/or remote sources (eg. http, ftp). It is designed to be used in programs that need common (but not necessarily simple) url-fetching features. It is extremely simple to drop into an existing program and provides a clean interface to protocol-independant file-access. Best of all, URL::Grab takes care of all those pesky file-fetching details, and lets you focus on whatever it is that your program is written to do!

EXPORT

None by default.

SEE ALSO

LWP::UserAgent

Project mailinglist: http://lists.linux-kernel.at/wwsympa.fcgi/info/url-grab

Project website: http://projects.linux-kernel.at/URL-Grab/

AUTHOR

Oliver Falk, <oliver@linux-kernel.at>

THANKS

Gary Krueger <gkrueger@browsermedia.com> for pointing out some issues - #32434 - #32433

COPYRIGHT AND LICENSE

Copyright (C) 2006-2008 by Oliver Falk <oliver@linux-kernel.at>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.0 or, at your option, any later version of Perl 5 you may have available.