Subject: | position of each URI |
Date: | Thu, 06 Aug 2009 08:22:27 +1000 |
To: | bug-URI-Find [...] rt.cpan.org |
From: | Kevin Ryde <user42 [...] zip.com.au> |
When URI::Find gives me a url I'd like to report to the user a
line/column in the original input. It'd be good if URI::Find somehow
communicated a position in its callbacks.
Just a char offset in the input string would be ok. If it turns out
I've got something to say I can then count newlines for line/column.
I think I want the position which is the actual url "http://..." bit,
ie. after trimming leading cruft. But a few chars back wouldn't worry
me if that worked out easier initially.
I got the effect I wanted from the URI::Find 20090319 with
$-[3] // $-[5]
though of course that's utterly dependent on the form of s/// groups
used.