Help for this page

Select Code to Download


  1. or download this
    my $factory = Config::Builder->new qw(
      user => user
    ...
    
    print "user dir is ".$config->("userdir")."\n";
    print "admin dir is ".$config->("userdir")."\n";
    
  2. or download this
    $values = {
        basedir => "/base/dir"
    ...
    /base/dir/html/user
    /base/dir/html/admin
    ----
    
  3. or download this
    $values = {
        basedir => "/base/dir",
    ...
    /base/dir/html/customuser
    /base/dir/html/admin
    ---
    
  4. or download this
    $values = {
        basedir => "/base/dir",
    ...
    
    /custom/html/dir/user
    /custom/html/dir/admin
    
  5. or download this
    my $c = read_your_config_file(); # returns a hash of values
    use File::Spec::Functions;
    ...
    $c->{userdir} ||= catfile($c->{htmldir}, $c->{user});
    $c->{admindir} ||= catfile($c->{htmldir}, $c->{admin});
    $c->{email} ||= "$c->{username}\@$c->{domain}";