![]() |
![]()
| ![]() |
![]()
NAMEPlack::Builder::Conditionals - Plack::Builder extension SYNOPSISuse Plack::Builder; use Plack::Builder::Conditionals; # exports "match_if, addr, path, method, header, browser, any, all" builder { enable match_if addr(['192.168.0.0/24','127.0.0.1']), "Plack::Middleware::ReverseProxy"; enable match_if all( path(qr!^/private!), addr( '!', [qw!127.0.0.1 ::1!] ) ), "Plack::Middleware::Auth::Basic", authenticator => \&authen_cb; enable match_if sub { my $env = shift; $env->{HTTP_X_ENABLE_FRAMEWORK} }, "Plack::Middleware::XFramework", framework => 'Test'; $app; }; use Plack::Builder::Conditionals -prefx => 'c'; # exports "c_match_if, c_addr, c_path, c_method, c_header, c_any, c_all" DESCRIPTIONPlack::Builder::Conditionals is.. FUNCTIONS
EXPORTuse Plack::Builder::Conditionals -prefx => 'c'; # exports "c_match_if, c_addr, c_path, c_method, c_header, c_any, c_all" you can add selected prefix to export functions AUTHORMasahiro Nagano <kazeburo {at} gmail.com> SEE ALSOPlack::Builder LICENSEThis library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
|