No description
This repository has been archived on 2026-08-22. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • Perl 96.6%
  • HTML 3.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jan Henning Thorsen 107b4e8707 0.10 Wed Jun 8 14:12:45 CEST 2011
- First release of Plack::App::File::DirectoryIndex
2011-06-08 14:12:46 +02:00
lib/Plack/App/File Add Plack::App::File::DirectoryIndex and tests 2011-06-08 13:51:13 +02:00
t Add Plack::App::File::DirectoryIndex and tests 2011-06-08 13:51:13 +02:00
.gitignore Init repo 2011-06-08 13:22:47 +02:00
Changes 0.10 Wed Jun 8 14:12:45 CEST 2011 2011-06-08 14:12:46 +02:00
Makefile.PL Init repo 2011-06-08 13:22:47 +02:00
README Add Plack::App::File::DirectoryIndex and tests 2011-06-08 13:51:13 +02:00

NAME
    Plack::App::File::DirectoryIndex - Autoload resources in directories

VERSION
    0.10

DESCRIPTION
    This app will automatically load files if a directory is given.

SYNOPSIS
        builder {
            mount '/' =>
                Plack::App::File::DirectoryIndex->new(
                    root => '/some/directory',
                    index_files => [qw/ index.html README /],
                );
        };

ATTRIBUTES
  file
    This attribute exists in Plack::App::File, but setting this in "new"
    will cause an exception.

  index_files
    Holds a list of files to search for when a directory is given. Default
    value holds one element: "index.html".

METHODS
  new
    Will construct a new object, with the given attributes as input.

  should_handle
    Will return true if the given file is a diectory or plain file.

  serve_path
    Does the same as "serve_path" in Plack::App::File, but will load files
    from "index_files" if a directory is given.

COPYRIGHT & LICENSE
    This library is free software. You can redistribute it and/or modify it
    under the same terms as Perl itself.

AUTHOR
    Jan Henning Thorsen "jhthorsen at cpan.org"