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


package Debconf::DbDriver::Debug;
use strict;
use Debconf::Log qw{:all};
use base 'Debconf::DbDriver';



use fields qw(db);


sub init {
	my $this=shift;

	if (! ref $this-&gt;{db}) {
		$this-&gt;{db}=$this-&gt;driver($this-&gt;{db});
		unless (defined $this-&gt;{db}) {
			$this-&gt;error("could not find db");
		}
	}
}

sub DESTROY {}

sub AUTOLOAD {
	my $this=shift;
	(my $command = our $AUTOLOAD) =~ s/.*://;

	debug "db $this-&gt;{name}" =&gt; "running $command(".join(",", map { "'$_'" } @_).") ..";
	if (wantarray) {
		my @ret=$this-&gt;{db}-&gt;$command(@_);
		debug "db $this-&gt;{name}" =&gt; "$command returned (".join(", ", @ret).")";
		return @ret if @ret;
	}
	else {
		my $ret=$this-&gt;{db}-&gt;$command(@_);
		if (defined $ret) {
			debug "db $this-&gt;{name}" =&gt; "$command returned \'$ret\'";
			return $ret;
		}
		else  {
			debug "db $this-&gt;{name}" =&gt; "$command returned undef";
		}
	}
	return; # failure
}


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