URI::Title(3pm)
π NAME π
URI::Title β get the titles of things on the web in a sensible way π¦
β¨ VERSION β¨
version 1.904 β yes bestie, she's on 1.904 π
πΈ SYNOPSIS πΈ
okay so literally the whole vibe is like three lines, watch:
use URI::Title qw( title );
my $title = title('http://microsoft.com');
print "Title is $title\n";
that's it. that's the whole thing. slay π
π DESCRIPTION π
so the author keeps needing to find the title of stuff on the web. and like, on paper? super simple request. just get() the object, parse for a title tag, done, right?
ha. I wish. π there are several problems with that approach:
- what if the resource is on a very slow server? do we wait for ever or what? π
- what if the resource is a 900 gig file? bestie you do not want to download that π
- what if the page title isn't in a title tag at all, but is buried somewhere in the HTML? π΅οΈ
- what if the resource is an MP3 file, or a word document or something? π§
- ... and like, more. so many more.
so, the plan: let's solve these issues once. π
π METHODS π
only one, bestie. the title(url) method. call it with an url, get the title if possible, undef if it wasn't. very simple. no notes. β¨
π¦ SEE ALSO π¦
WWW::GetPageTitleβ similar this module, but just handles web pages. the author of that module suggests you should useURI::Title. so like, we ate π
wait no that's the whole list, just the one. π
π NOTES π
embedded title metadata of png files can be extracted if you have installed either Image::ExifTool or Image::PNG::Libpng. cute png lore fr fr π§
π TODO π
many, many, many things. still unimplemented:
- get titles of MP3 files, Word Docs, PDFs, etc. π
- configurable.. well, anything, in fact. Timeout would be a good start. β±οΈ
- better error reporting. π
π AUTHORS π
- Tom Insam
<tom@jerakeen.org>, original author, 2004-2012. - Philippe Bruhat (BooK)
<book@cpan.org>, maintainer, 2014.
π COPYRIGHT AND LICENSE π
this software is copyright (c) 2004 Tom Insam.
this program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
fr fr, same terms as Perl itself, no cap π
π CREDITS π
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. iconic behavior from both of them honestly π«Ά
okay that's the whole page bestie, this was perl v5.36.0, dated 2023-02-12, and it's URI::Title(3pm) β user contributed perl documentation, main character energy only πβ¨π bye!!
π¦ where this page comes from
- debian bookworm: liburi-title-perl 1.904-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: liburi-title-perl 1.904-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: liburi-title-perl 1.904-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: liburi-title-perl 1.904-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: liburi-title-perl 1.904-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms