On Fri, Dec 24, 2004 at 08:51:56AM -0500, Guest via RT wrote:
Show quoted text>
> This message about WWW-Mechanize was sent to you by guest <> via rt.cpan.org
>
> Full context and any attached attachments can be found at:
> <URL:
https://rt.cpan.org/Ticket/Display.html?id=9126 >
>
> When doing something like:
> my @download_urls = $agent->find_all_links();
> foreach my $download_url (@download_urls) {
> $res = $agent->get( $download_url );
> }
>
> Doesn't work because the links are relative.
> Shouldn't always them be absolute, like browsers do when you copy a link?
> I don't know why anyone would like relative links.
This is a reasonable suggestion. I don't see many drawbacks to this.
Show quoted text> At least "$res = $agent->get( $download_url );" should work with relative links.
I think it does if you do this:
my @download_urls = $agent->find_all_links();
foreach my $download_url (@download_urls) {
$res = $agent->get( $download_url );
# You have to back to be relative to the right place.
$agent->back();
}
Mark