CGI-Builder-Auth

 view release on metacpan or  search on metacpan

lib/CGI/Builder/Auth/GroupAdmin/SQL.pm  view on Meta::CPAN

	       USER => "", 	            #database login name	    
	       AUTH => "",                  #database login password
	       DRIVER => "mSQL",            #driver for DBI
	       GROUPTABLE => "",             #table with field names below
	       NAMEFIELD => "user",         #field for the name
	       GROUPFIELD => "group",       #field for the group
	       );

sub new {
    my($class) = shift;
    my $self = bless { %Default, @_ } => $class;
    $self->_check(qw(DRIVER DB GROUPTABLE)); 
    if(!defined $self->{'DBH'}) { $self->db($self->{DB}) }
    else { $self->{'_DBH'} = $self->{'DBH'}; };
    return $self;
}

sub DESTROY {
    my($self) = @_;
    #Don't disconnect if you didn't make it.
    $self->{'_DBH'}->disconnect if(!defined $self->{'DBH'});

lib/CGI/Builder/Auth/GroupAdmin/Text.pm  view on Meta::CPAN

# Apache 1.3.4 this limitation on lines in the group file.
$LineMax = 8 * 1024;

my %Default = (PATH => ".", 
	       DB => ".htgroup", 
	       FLAGS => "rwc",
	       );

sub new {
    my($class) = shift;
    my $self = bless { %Default, @_ } => $class;
    #load the DBM methods
    $self->load("CGI::Builder::Auth::GroupAdmin::DBM");
    $self->db($self->{DB}); 
    return $self;
}

sub _tie {
    my($self) = @_;
    my($fh,$db) = ($self->gensym(), $self->{DB});
    my($key,$val);

lib/CGI/Builder/Auth/UserAdmin/DBM.pm  view on Meta::CPAN


my %Default = (PATH => ".",
	       DB => ".htpasswd",
	       DBMF => "NDBM", 
	       FLAGS => "rwc",
	       MODE => 0644, 
	    );

sub new {
    my($class) = shift;
    my $self = bless { %Default, @_ } => $class;
    $self->_dbm_init;
    $self->db($self->{DB}); 
    return $self;
}

sub DESTROY {
    local($^W)=0;
    $_[0]->_untie('_HASH');
    $_[0]->unlock;
}

lib/CGI/Builder/Auth/UserAdmin/DBM/netscape.pm  view on Meta::CPAN


my %Default = (PATH => ".",
	       DB => ".htpasswd",
	       DBMF => "DBNull", 
	       FLAGS => "rwc",
	       MODE => 0644, 
	    );

sub new {
    my($class) = shift;
    my $self = bless { %Default, @_ } => $class;
    $self->{DBMF} = 'DBNull';  # force null-terminated NDBM_File
    $self->_dbm_init;
    $self->db($self->{DB}); 
    return $self;
}

sub add {
    # deliberately get rid of additional info
    # since we don't understand Netscape format.
    my($self,$user,$passwd) = @_;

lib/CGI/Builder/Auth/UserAdmin/SQL.pm  view on Meta::CPAN

	       USER => "", 	            #database login name	    
	       AUTH => "",                  #database login password
	       DRIVER => "mSQL",            #driver for DBI
	       USERTABLE => "",             #table with field names below
	       NAMEFIELD => "user",         #field for the name
	       PASSWORDFIELD => "password", #field for the password
	       );

sub new {
    my($class) = shift;
    my $self = bless { %Default, @_ } => $class;
    $self->_check(qw(DRIVER DB USERTABLE)); 
    if(!defined $self->{'DBH'}) { $self->db($self->{DB}) }
    else { $self->{'_DBH'} = $self->{'DBH'}; };
    return $self;
}

sub DESTROY {
    my($self) = @_;
    #Don't disconnect if you didn't make it.
    $self->{'_DBH'}->disconnect if(!defined $self->{'DBH'});

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.020 second using v1.00-cache-1.14-grep-28634ff-cpan-207214f8fbd )