Changeset 485 for trunk


Ignore:
Timestamp:
03/15/13 12:19:59 (12 years ago)
Author:
Kris Deugau
Message:

/trunk

Object conversion of DNSDB.pm, part 17. See #11.

  • export() and its caller
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB.pm

    r484 r485  
    47694769## DNSDB::export()
    47704770# Export the DNS database, or a part of it
    4771 # Takes database handle, export type, optional arguments depending on type
     4771# Takes a string indicating the export type, plus optional arguments depending on type
    47724772# Writes zone data to targets as appropriate for type
    47734773sub export {
    4774   my $dbh = shift;
     4774  my $self = shift;
    47754775  my $target = shift;
    47764776
    47774777  if ($target eq 'tiny') {
    4778     __export_tiny($dbh,@_);
     4778    $self->__export_tiny(@_);
    47794779  }
    47804780# elsif ($target eq 'foo') {
    4781 #   __export_foo($dbh,@_);
     4781#   __export_foo(@_);
    47824782#}
    47834783# etc
     
    47884788## DNSDB::__export_tiny
    47894789# Internal sub to implement tinyDNS (compatible) export
    4790 # Takes database handle, filehandle to write export to, optional argument(s)
     4790# Takes filehandle to write export to, optional argument(s)
    47914791# to determine which data gets exported
    47924792sub __export_tiny {
    4793   my $dbh = shift;
     4793  my $self = shift;
     4794  my $dbh = $self->{dbh};
    47944795  my $datafile = shift;
    47954796
  • trunk/export.pl

    r468 r485  
    3131open TINYDATA, ">tinydata";
    3232
    33 export($dbh,'tiny',*TINYDATA);
     33$dnsdb->export('tiny', *TINYDATA);
Note: See TracChangeset for help on using the changeset viewer.