Authen-Htpasswd
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Authen/Htpasswd.pm view on Meta::CPAN
=head2 update_user
$pwfile->update_user($userobj);
$pwfile->update_user($username, $password[, @extra_info], \%options);
Modifies the entry for a user saves it to the file. If the user entry does not
exist, it is created. The options in the second form are passed to L<Authen::Htpasswd::User>.
=cut
sub update_user {
my $self = shift;
my $user = $self->_get_user(@_);
my $username = $user->username;
my ($old,$new) = $self->_start_rewrite;
my $seen = 0;
while (defined(my $line = <$old>)) {
if ($line =~ /^\Q$username\E:/) {
chomp $line;
my (undef,undef,@extra_info) = split /:/, $line;
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.543 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )