Package variables | General documentation | Methods |
WebCvs | Raw content |
AUTOLOAD | No description | Code |
DESTROY | No description | Code |
connect | No description | Code |
dbh | No description | Code |
dbname | No description | Code |
host | No description | Code |
pass | No description | Code |
port | No description | Code |
user | No description | Code |
AUTOLOAD | description | prev | next | Top |
my $self = shift; $AUTOLOAD =~ /(\w+)$/; my $method = $1; $self->dbh()->$method(@_);}
DESTROY | description | prev | next | Top |
}
1;
}connect | description | prev | next | Top |
my $class = shift; my $dsn = shift; my $user = shift; my $pass = shift; my $opts = shift; my $self = bless {}, $class; $self->dbh(DBI->connect($dsn, $user, $pass,$opts)); $dsn =~ s/^\w+:\w+://; my @ar = split(';', $dsn); foreach my $str (@ar) { my ($type, $value) = split(/\s*=\s*/, $str); $self->$type($value); } $self->user($user); $self->pass($pass); return $self;}
dbh | description | prev | next | Top |
my $self = shift; return $self->{'dbh'} = shift if(@_); return $self->{'dbh'};}
dbname | description | prev | next | Top |
my $self = shift; return $self->{'dbname'} = shift if(@_); return $self->{'dbname'};}
host | description | prev | next | Top |
my $self = shift; return $self->{'hostname'} = shift if(@_); return $self->{'hostname'};}
pass | description | prev | next | Top |
my $self = shift; return $self->{'password'} = shift if(@_); return $self->{'password'};}
port | description | prev | next | Top |
my $self = shift; return $self->{'port'} = shift if(@_); return $self->{'port'};}
user | description | prev | next | Top |
my $self = shift; return $self->{'user'} = shift if(@_); return $self->{'user'};}