HTML::LinkChanger::Absolutizer - subclass of HTML::LinkChanger that converts all relative URLs to absolute ones.
use HTML::LinkChanger; use HTML::LinkChanger::Absolutizer;
my $filters = [ new HTML::LinkChanger::Absolutizer( base_url => 'http://www.google.com/' ) ];
my $changer = new HTML::LinkChanger( url_filters => $filters );
my $out = $changer->filter($in);
HTML::LinkChanger::Absolutizer is an implementation of HTML::LinkChanger::URLFilter that can be used in HTML::LinkChanger to convert all relative URLs to absolute.
This module can be very useful when processing RSS feeds for example since RSS standards are not very strict about relative URL handling and might misinterpret them.
Sergey Chernyshev <sergeyche@cpan.org>
HTML::LinkChanger
To install HTML::LinkChanger, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::LinkChanger
CPAN shell
perl -MCPAN -e shell install HTML::LinkChanger
For more information on module installation, please visit the detailed CPAN module installation guide.