Changeset 468 for trunk/dns-rpc.cgi


Ignore:
Timestamp:
03/12/13 13:39:49 (12 years ago)
Author:
Kris Deugau
Message:

/trunk

Object conversion of DNSDB.pm, 4 of <mumble>. See #11.

  • Convert initialization of bundled callers to object calls
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dns-rpc.cgi

    r460 r468  
    3939#package main;
    4040
    41 DNSDB::loadConfig(rpcflag => 1);
    42 
    43 # need to create a DNSDB object too
    44 my ($dbh,$msg) = DNSDB::connectDB($DNSDB::config{dbname}, $DNSDB::config{dbuser},
    45         $DNSDB::config{dbpass}, $DNSDB::config{dbhost});
    46 
    47 DNSDB::initGlobals($dbh);
     41my $dnsdb = DNSDB->new();
    4842
    4943my $methods = {
     
    8074
    8175# "Can't do that" errors
    82 if (!$dbh) {
     76if (!$dnsdb) {
    8377  print "Content-type: text/xml\n\n".$res->{_decode}->encode_fault(5, $msg);
    8478  exit;
Note: See TracChangeset for help on using the changeset viewer.