mreece has asked for the wisdom of the Perl Monks concerning the following question:
but what about URIs? i don't see any handy methods on the URI class for appending values. so i had an idea, i could use File::Spec::Unix to manipulate the path portion of the URI.use File::Spec; my $filepath = File::Spec->catfile( $dir, $filename );
my question is, is this a good idea or bad idea? am i overlooking an existing best/common practice for dealing with this?use File::Spec::Unix; use URI; my $uri = URI->new( $base ); $uri->path( File::Spec::Unix->catfile( $uri->path, 'foo.html' ) );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: URI plus File::Spec::Unix -- good idea or bad?
by brian_d_foy (Abbot) on Aug 24, 2006 at 21:13 UTC | |
by mreece (Friar) on Aug 24, 2006 at 21:43 UTC | |
by duckyd (Hermit) on Aug 24, 2006 at 22:31 UTC | |
|
Re: URI plus File::Spec::Unix -- good idea or bad?
by insaniac (Friar) on Aug 24, 2006 at 21:19 UTC | |
|
Re: URI plus File::Spec::Unix -- good idea or bad?
by izut (Chaplain) on Aug 24, 2006 at 23:51 UTC | |
by mreece (Friar) on Aug 25, 2006 at 00:01 UTC | |
|
Re: URI plus File::Spec::Unix -- good idea or bad?
by Anonymous Monk on Aug 25, 2006 at 13:36 UTC | |
by mreece (Friar) on Aug 25, 2006 at 16:35 UTC | |
by mreece (Friar) on Aug 25, 2006 at 16:55 UTC |