=encoding utf8

=head1 NAME

Any::Daemon::HTTP::UserDirs - describe user directories

=head1 INHERITANCE

 Any::Daemon::HTTP::UserDirs
   is an Any::Daemon::HTTP::Directory
   is an Any::Daemon::HTTP::Source

=head1 SYNOPSIS

 # implicit creation of ::Directory object
 my $vh = Any::Daemon::HTTP::VirtualHost
   ->new(user_dirs => {location => ...})

 # explicit use
 my $ud = Any::Daemon::HTTP::Directory::UserDirs
   ->new(location => sub {...});
 my $vh = Any::Daemon::HTTP::VirtualHost->new(user_dirs => $ud);

=head1 DESCRIPTION

Each L<Any::Daemon::HTTP::VirtualHost|Any::Daemon::HTTP::VirtualHost> may define user directories.

Extends L<"DESCRIPTION" in Any::Daemon::HTTP::Directory|Any::Daemon::HTTP::Directory/"DESCRIPTION">.
 
=head1 METHODS

Extends L<"METHODS" in Any::Daemon::HTTP::Directory|Any::Daemon::HTTP::Directory/"METHODS">.
 
=head2 Constructors

Extends L<"Constructors" in Any::Daemon::HTTP::Directory|Any::Daemon::HTTP::Directory/"Constructors">.
 
=over 4

=item Any::Daemon::HTTP::UserDirs-E<gt>B<new>(%options|\%options)

The user-dir rewrite routine has by default Apache-like behavior.

 -Option        --Defined in                  --Default
  allow           Any::Daemon::HTTP::Source     <undef>
  allow_users                                   undef
  charset         Any::Daemon::HTTP::Directory  utf-8
  deny            Any::Daemon::HTTP::Source     <undef>
  deny_users                                    []
  directory_list  Any::Daemon::HTTP::Directory  <false>
  index_file      Any::Daemon::HTTP::Directory  ['index.html', 'index.htm']
  location        Any::Daemon::HTTP::Directory  CODE
  name            Any::Daemon::HTTP::Source     path
  path            Any::Daemon::HTTP::Source     <ignored>
  user_subdirs                                  'public_html'

=over 2

=item allow => CIDR|HOSTNAME|DOMAIN|CODE|ARRAY

=item allow_users => ARRAY

Lists the user homes which are available.  Cannot be used together with
C<deny_users>.  By default, all user homes are permitted, even those
of system usernames like C<ftp> and C<cups>.
Only used with the default user-dir rewrite rule.

=item charset => STRING

=item deny => CIDR|HOSTNAME|DOMAIN|CODE|ARRAY

=item deny_users => ARRAY

Only used with the default user-dir rewrite rule.

=item directory_list => BOOLEAN

=item index_file => STRING|ARRAY

=item location => DIRECTORY|CODE

=item name => STRING

=item path => PATH

=item user_subdirs => PATH

Only used with the default user-dir rewrite rule.

=back

=back

=head2 Attributes

Extends L<"Attributes" in Any::Daemon::HTTP::Directory|Any::Daemon::HTTP::Directory/"Attributes">.
 
=over 4

=item $obj-E<gt>B<charset>()

Inherited, see L<Any::Daemon::HTTP::Directory/"Attributes">

=item $obj-E<gt>B<location>()

Inherited, see L<Any::Daemon::HTTP::Directory/"Attributes">

=item $obj-E<gt>B<name>()

Inherited, see L<Any::Daemon::HTTP::Source/"Attributes">

=item $obj-E<gt>B<path>()

Inherited, see L<Any::Daemon::HTTP::Source/"Attributes">

=back

=head2 Permissions

Extends L<"Permissions" in Any::Daemon::HTTP::Directory|Any::Daemon::HTTP::Directory/"Permissions">.
 
=over 4

=item $obj-E<gt>B<allow>($session, $request, $uri)

Inherited, see L<Any::Daemon::HTTP::Source/"Permissions">

=item $obj-E<gt>B<collect>($vhost, $session, $request, $uri)

Inherited, see L<Any::Daemon::HTTP::Source/"Permissions">

=back

=head2 Actions

Extends L<"Actions" in Any::Daemon::HTTP::Directory|Any::Daemon::HTTP::Directory/"Actions">.
 
=over 4

=item $obj-E<gt>B<filename>($path)

Inherited, see L<Any::Daemon::HTTP::Directory/"Actions">

=item $obj-E<gt>B<list>($directory, %options)

Inherited, see L<Any::Daemon::HTTP::Directory/"Actions">

=back

=head1 DETAILS

Extends L<"DETAILS" in Any::Daemon::HTTP::Directory|Any::Daemon::HTTP::Directory/"DETAILS">.
 
=head1 SEE ALSO

This module is part of Any-Daemon-HTTP distribution version 0.28,
built on March 20, 2019. Website: F<http://perl.overmeer.net/any-daemon/>

=head1 LICENSE

Copyrights 2013-2019 by [Mark Overmeer]. For other contributors see ChangeLog.

This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
See F<http://dev.perl.org/licenses/>

