30 Jan
2011
30 Jan
'11
9:46 a.m.
Hi all, I'm trying to create an Apache-style directory view with links to files and subdirectories and showing file length. I'm attempting to match a route like '/media/foo/bar' and generate a directory listing for /public/foo/bar. I was playing with this tonight: get '/media/*' => sub { my $path = splat; ... } This matches '/media/foo' but I was expecting it to match '/media/foo/bar'. It appears that * doesn't match slashes. '/media/([\w/]+)' doesn't seem to work, either. I'd welcome suggestions for either problem: 1. matching paths with several levels of hierarchy 2. listing a directory Kind regards, Joel -- Joel Roth