qpsmtpd/lib/Qpsmtpd/Utils.pm
Matt Simerson b00f4c7793 initial import - based on my qpsmtpd fork
which will merge into the main branch fairly easily
2012-06-22 05:38:01 -04:00

16 lines
232 B
Perl

package Qpsmtpd::Utils;
use strict;
sub tildeexp {
my $path = shift;
$path =~ s{^~([^/]*)} {
$1
? (getpwnam($1))[7]
: ( $ENV{HOME} || $ENV{LOGDIR} || (getpwuid($>))[7])
}ex;
return $path;
}
1;