The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Plack::Middleware::Static::Combine - Serve multiple static files combined

VERSION

version 0.01

SYNOPSIS

    use Plack::Builder;

    builder {
        enable 'Static::Combine', 
            path  => qr{^/javascript\.js$},
            files => [ 'foo.js', 'bar.js', 'doz.js' ],
            root  => './htdocs';
        $app;
    };

DESCRIPTION

Plack::Middleware::Static::Combine combines multiple static files, as served via Plack::App::File. Files must have same content type or HTTP 500 is returned.

CONFIGURATION

path, root, encoding

URL pattern or callback, document root, and text file encoding, as passed to Plack::App::Static.

files

A list of files.

pass_through

When this option is set to a true value, then this middleware will never return an error response. Instead, it will simply pass the request on to the application it is wrapping.

SEE ALSO

Plack::Middleware::Static, Plack::Middleware::File, Plack::Middleware::Static::Minifier.

AUTHOR

Jakob Voß <voss@gbv.de>

COPYRIGHT AND LICENSE

This software is copyright (c) 2012 by Jakob Voß.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.