<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/usr/bin/perl
# This file was preprocessed, do not edit!


package Debconf::DbDriver::Backup;
use warnings;
use strict;
use Debconf::Log qw{:all};
use base 'Debconf::DbDriver::Copy';



use fields qw(db backupdb);


sub init {
	my $this=shift;

	foreach my $f (qw(db backupdb)) {
		if (! ref $this-&gt;{$f}) {
			my $db=$this-&gt;driver($this-&gt;{$f});
			unless (defined $f) {
				$this-&gt;error("could not find a db named \"$this-&gt;{$f}\"");
			}
			$this-&gt;{$f}=$db;
		}
	}
}


sub copy {
	my $this=shift;
	my $item=shift;

	$this-&gt;SUPER::copy($item, $this-&gt;{db}, $this-&gt;{backupdb});
}


sub shutdown {
	my $this=shift;

	$this-&gt;{backupdb}-&gt;shutdown(@_);
	$this-&gt;{db}-&gt;shutdown(@_);
}

sub _query {
	my $this=shift;
	my $command=shift;
	shift; # this again

	return $this-&gt;{db}-&gt;$command(@_);
}

sub _change {
	my $this=shift;
	my $command=shift;
	shift; # this again

	my $ret=$this-&gt;{db}-&gt;$command(@_);
	if (defined $ret) {
		$this-&gt;{backupdb}-&gt;$command(@_);
	}
	return $ret;
}

sub iterator	{ $_[0]-&gt;_query('iterator', @_)		}
sub exists	{ $_[0]-&gt;_query('exists', @_)		}
sub addowner	{ $_[0]-&gt;_change('addowner', @_)	}
sub removeowner { $_[0]-&gt;_change('removeowner', @_)	}
sub owners	{ $_[0]-&gt;_query('owners', @_)		}
sub getfield	{ $_[0]-&gt;_query('getfield', @_)		}
sub setfield	{ $_[0]-&gt;_change('setfield', @_)	}
sub fields	{ $_[0]-&gt;_query('fields', @_)		}
sub getflag	{ $_[0]-&gt;_query('getflag', @_)		}
sub setflag	{ $_[0]-&gt;_change('setflag', @_)		}
sub flags	{ $_[0]-&gt;_query('flags', @_)		}
sub getvariable { $_[0]-&gt;_query('getvariable', @_)	}
sub setvariable { $_[0]-&gt;_change('setvariable', @_)	}
sub variables	{ $_[0]-&gt;_query('variables', @_)	}


1
</pre></body></html>