HEX
Server: nginx/1.24.0
System: Linux webserver 6.8.0-85-generic #85-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep 18 15:26:59 UTC 2025 x86_64
User: wpuser (1002)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: //usr/share/perl5/Debconf/DbDriver/Debug.pm
#!/usr/bin/perl
# This file was preprocessed, do not edit!


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



use fields qw(db);


sub init {
	my $this=shift;

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

sub DESTROY {}

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

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


1