this is just an inquiry for whether there is some syntactic sugar here. I have an app in mount "/", plus a few lines like:
mount "/css" => builder {
enable 'ConditionalGET';
enable 'ETag', file_etag => [qw/inode mtime size/], ;
enable 'ContentLength';
Plack::App::File->new(root => "css")->to_app;
};
mount "/images" => builder {
enable 'ConditionalGET';
enable 'ETag', file_etag => [qw/inode mtime size/], ;
enable 'ContentLength';
Plack::App::File->new(root => "images")->to_app;
};
same for js, favicon.ico, and a few more. can this be combined? aka, something like
mount ("/static", "/css", "/images", "/js", "*.png", ... ) => builder {
enable 'ETag', file_etag => [qw/inode mtime size/], ;
Plack::App::File->new(root => $_)->to_app;
this pseudo code is obvious nonsense. it is just to show intent. easy? impossible?
regards, /iaw