in reply to URI plus File::Spec::Unix -- good idea or bad?
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. :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: URI plus File::Spec::Unix -- good idea or bad?
by mreece (Friar) on Aug 24, 2006 at 21:43 UTC | |
by duckyd (Hermit) on Aug 24, 2006 at 22:31 UTC |