URI::Title - get the titles of things on the web in a sensible way
use URI::Title qw( title );
my $title = title('http://microsoft.com');
print "Title is $title\n";
I keep having to find the title of things on the web. This seems like a really simple request, just get() the object, parse for a title tag, you're done. Ha, I wish. There are several problems with this approach:
So, let's solve these issues once.
only one, the title(url) method. Call it with an url, get the title if possible, undef if it wasn't. Very simple.
Many, many, many things. Still unimplemented:
Invented because of a conversation with rjp, who contributed some eyeball-melting and as-yet-unused code to get titles from MP3s and PDFs, and hex, who has also solved the problem, and got bits done in a nicer way than I did.
1 POD Error
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head1'
To install URI::Title, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.