NAME

Plack::Middleware::SubSpec::LoadModule - Load requested module

VERSION

version 0.06

SYNOPSIS

# in app.psgi
use Plack::Builder;

builder {
    enable "SubSpec::LoadModule";
};

DESCRIPTION

This middleware loads module specified in $env->{'ss.request.module'} using Module::Load. Will do nothing if module is not specified. Will return 500 error if failed to load module. It should be enabled after the SubSpec::ParseRequest middleware.

CONFIGURATIONS

  • debug => BOOL (default 0)

    If set to true, will display full error message in error page when failing to load module. Otherwise, only a generic "failed to load module" message is displayed.

AUTHOR

Steven Haryanto <stevenharyanto@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2011 by Steven Haryanto.

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