|Subject:||trouble parsing a URI example from wikipedia|
|Date:||Wed, 22 Jun 2011 15:54:44 -0400|
|To:||bug-URI [...] rt.cpan.org|
|From:||Fulko Hew <fulko.hew [...] gmail.com>|
I thought I'd try to use URI.pm in my code, and when I tested it with an example I saw in Wikipedia, it didn't work right. Therefore I don't know if Wikipedia is incorrect, URI.pm has a bug or URI.pm has a limitation. The URI I was testing against was from:with the actual text of: foo://username:firstname.lastname@example.org:8042/over/there/index.dtb?type=animal&name=narwhal#nose So my test code was: perl -e 'use URI; $u=URI->new("foo://username:email@example.com:8000/over/there/index.dtb?type=animal&name=narwhal#nose"); print $u->host, "\n";' expecting to see 'example.com' emitted, but I see 'username:password.com' instead. I also tried printing 'userinfo', but that also didn't decode correctly.