Subject: | warnings on title from already downloaded data |
Date: | Tue, 02 Dec 2008 10:43:39 +1100 |
To: | bug-URI-Title [...] rt.cpan.org |
From: | Kevin Ryde <user42 [...] zip.com.au> |
I thought to give URI::Title 1.82 (and debian perl 5.10.0) a go on some
already-downloaded html, like
use URI::Title;
my $html = '<html><head><title>My Page</title></head>
<body>Hello</body>
</html>';
print URI::Title::title ({ data => $html });
but got warnings
Use of uninitialized value $url in pattern match (m//) at /usr/share/perl5/URI/Title/HTML.pm line 49.
Use of uninitialized value $url in pattern match (m//) at /usr/share/perl5/URI/Title/HTML.pm line 49.
...
Is that allowed? Or not quite yet?
As a suggestion it could helpfully accept 'data' and 'url' args
together, for when you know the url some data came from. It might also
optionally take a whole HTTP::Response object and pick info out of that
(something done internally no doubt, just a matter of allowing it to the
world).