Subject: | Does module create a new passwd file if none exists? |
Hi Kevin,
Thanks for such a useful module. I'm try to do some testing where a passwd file does not yet exist. My tests are failing with the error that the file or directory cannot be found (no such file or directory).
I found that simply creating an empty file is sufficient for my tests to pass. It would be nice if there were a way to have A::Htpasswd handle this. Here's all the code it required:
#
# If the password file does not exist, create it
unless (-e $passwd_file) {
open (PASS, ">$passwd_file") || die "Unable to open $passwd_file: $!";
close PASS;
}
Thanks,
William