Apache-Htpasswd-Perishable

 view release on metacpan or  search on metacpan

Perishable.pm  view on Meta::CPAN


=head1 SYNOPSIS

  use Apache::Htpasswd::Perishable;

=head1 DESCRIPTION

This module allows you to define and extend an expiration date that is put into the 
extra-info field of an .htpasswd entry like:

  username:encrypted-password:extra-info


=head2 METHODS

This module inherits all methods from Apache::Htpasswd, and also adds:

expire() - expire($username,$days_from_today).  (over)writes the extra-info field
of an .htpasswd entry.  Calling expire($username) returns the number of days
until expiration.

eg/eg1.pl  view on Meta::CPAN

#!/usr/bin/perl

use lib '../blib/lib';
use strict;
use Apache::Htpasswd::Perishable;

my $passwd = Apache::Htpasswd::Perishable->new('.htpasswd');
   $passwd->htpasswd("zog", "password");
   $passwd->expire("zog",31);
   $passwd->extend("zog",10);



( run in 0.555 second using v1.01-cache-2.11-cpan-49f99fa48dc )