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

NAME

DTA::CAB::Server::HTTP::Handler::Directory - CAB HTTP Server: request handler: directory

SYNOPSIS

 ##========================================================================
 ## PRELIMINARIES
 
 use DTA::CAB::Server::HTTP::Handler::Directory;
 
 ##========================================================================
 ## Methods
 
 $h = $class_or_obj->new(%options);
 $bool = $h->prepare($server);
 $rsp = $h->run($server, $localPath, $clientConn, $httpRequest);
 

DESCRIPTION

DTA::CAB::Server::HTTP::Handler::Directory is a DTA::CAB::Server::HTTP::Handler subclass for mirroring a local filesystem directory with a DTA::CAB::Server::HTTP::Server.

Methods

new
 $h = $class_or_obj->new(%options);

%options, %$h:

 dir => $baseDirectory,  ##-- default='.'
 logLevel => $level,     ##-- debug log level (defaul=undef (none))
prepare
 $bool = $h->prepare($server);

Checks for readability of $h->{dir}.

run
 $rsp = $h->run($server, $localPath, $clientConn, $httpRequest);

Retrieves and returns the file matching $localPath under $h->{dir}.

AUTHOR

Bryan Jurish <moocow@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2010-2019 by Bryan Jurish

This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.24.1 or, at your option, any later version of Perl 5 you may have available.

SEE ALSO

DTA::CAB::Server::HTTP::Handler(3pm), DTA::CAB::Server::HTTP(3pm), DTA::CAB(3pm), perl(1), ...