URLs are the same everywhere you go, so you don't need the localization magic of File::Spec to figure out how to put them together. Just use the forward slash (/) to join the path elements. It's so trivial I guess URI doesn't see fit to wrap it in a method name. :)
So, in your example, if $uri->path ends in a slash, just concatenate the foo.html. If the $uri->path doesn't end in a slash, make it end in a slash, then add the foo.html. That's just what File::Spec::Unix->catfile is doing, although you're not really supposed to be peeking down there. :) If that's all your using that module for, it's probably not worth it to even compile it. :)
In reply to Re: URI plus File::Spec::Unix -- good idea or bad?
by brian_d_foy
in thread URI plus File::Spec::Unix -- good idea or bad?
by mreece
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |