Apache-PSP
view release on metacpan or search on metacpan
lib/Template/PSP.pm view on Meta::CPAN
# leave authorization for another time
# if ($ENV->{HTTP_AUTHORIZATION})
# {
# my @list = split(/ /, $ENV{HTTP_AUTHORIZATION});
# if (lc($list[0]) eq "basic")
# {
# my $encoded = pop(@list);
# my $decoded = decode_base64($encoded);
#
# ($AUTH->{username}, $AUTH->{password}) = split(/:/, $decoded);
# }
# }
return 1;
}
#########################################
# Template::PSP::Parser
# used to process psp pages using HTML::Parser
lib/Template/PSP/Tags.psp view on Meta::CPAN
</perl>
</tag>
<tag name="cookie" global="1" accepts="name,value,expires,path">
<perl>
SetCookie($name, $value, $expires, $path);
</perl>
</tag>
<tag name="ldap" global="1" body="1"
accepts="name,host,port,username,password,timeout,action,base,sort,attributes">
Unimplemented at this time.
</tag>
<tag name="location" global="1" accepts="url">
<perl>
Redirect($url);
</perl>
</tag>
lib/Template/PSP/Tags.psp view on Meta::CPAN
</tag>
<tag name="exit" global="1">
<perl>
exit();
</perl>
</tag>
<tag name="sql" body="1" global="1" accepts="name,dbtype,db,username,password,action">
<perl>
my $sth;
# local $SIG{__DIE__} = sub {
# print STDERR @_;
# };
my $dbh = DBI->connect(
"DBI:$dbtype:$db",
$username,
$password,
{AutoCommit => 1}) || croak $DBI::errstr;
# $dbh->{Warn} = 0;
$sth = $dbh->prepare($body) || croak $dbh->errstr();
$sth->execute() || croak $dbh->errstr;
# cleanup (sub {
# $dbh->commit;
# $dbh->disconnect;
( run in 0.459 second using v1.01-cache-2.11-cpan-49f99fa48dc )