[NUFFIN - Fri Nov 25 21:04:46 2005]:
Show quoted text> To all other observers of this bug - I can only reccomend you use
> Authen::Htpasswd instead of
> this module.
Unfortunately, Authen::Htpasswd does not appear to return a list of users, which I need.
Here's where I got my problem:
my %users = map { $_ => $h->fetchPass($_) } $h->fetchUsers;
Indeed, adding "local $_;" (on line 248 for this particular method) resolved my problem
(which was that my hash keys were full .htaccess lines).
Attached is a patch against 1.7 that I think should eliminate these problems. Thanks.
--- /home/xxxxx/perl/share/perl/5.8/Apache/Htpasswd.pm 2005-11-21 15:15:13.000000000 -0800
+++ Htpasswd.pm 2006-01-08 13:25:00.000000000 -0800
@@ -198,6 +198,7 @@
$self->_open();
seek( FH, 0, SEEK_SET );
+ local $_;
while (<FH>) {
if (/^$Id\:/) {
@@ -245,6 +246,7 @@
$self->_open();
+ local $_;
while (<FH>) {
chop;
my @tmp = split ( /:/, $_, 3 );
@@ -273,6 +275,7 @@
$self->_open();
seek( FH, 0, SEEK_SET );
+ local $_;
while (<FH>) {
my @tmp = split ( /:/, $_, 3 );
@@ -325,6 +328,7 @@
$self->_open();
+ local $_;
while (<FH>) {
chop;
my @tmp = split ( /:/, $_, 3 );
@@ -349,6 +353,7 @@
$self->_open();
+ local $_;
while (<FH>) {
chop;
my @tmp = split ( /:/, $_, 3 );
@@ -375,6 +380,7 @@
$self->_open();
seek( FH, 0, SEEK_SET );
+ local $_;
while (<FH>) {
my @tmp = split ( /:/, $_, 3 );