PHP 8.5.2
Preview: Db.pm Size: 1.18 KB
//usr/share/perl5/Debconf/Db.pm

#!/usr/bin/perl
# This file was preprocessed, do not edit!


package Debconf::Db;
use warnings;
use strict;
use Debconf::Log qw{:all};
use Debconf::Config;
use Debconf::DbDriver;
our $config;
our $templates;


sub load {
	my $class=shift;

	Debconf::Config->load('', @_); # load default config file
	$config=Debconf::DbDriver->driver(Debconf::Config->config);
	if (not ref $config) {
		die "Configuration database \"".Debconf::Config->config.
			"\" was not initialized.\n";
	}
	$templates=Debconf::DbDriver->driver(Debconf::Config->templates);
	if (not ref $templates) {
		die "Template database \"".Debconf::Config->templates.
			"\" was not initialized.\n";
	}
}


sub makedriver {
	my $class=shift;
	my %config=@_;

	my $type=$config{driver} or die "driver type not specified (perhaps you need to re-read debconf.conf(5))";

	if (! UNIVERSAL::can("Debconf::DbDriver::$type", 'new')) {
		eval qq{use Debconf::DbDriver::$type};
		die $@ if $@;
	}
	delete $config{driver}; # not a field for the object

	debug db => "making DbDriver of type $type";
	"Debconf::DbDriver::$type"->new(%config);
}


sub save {

	$config->shutdown if $config;
	$templates->shutdown if $templates;
	$config='';
	$templates='';
}


1

Directory Contents

Dirs: 6 × Files: 18

Name Size Perms Modified Actions
Client DIR
- drwxr-xr-x 2026-01-08 12:54:17
Edit Download
DbDriver DIR
- drwxr-xr-x 2026-01-08 12:54:17
Edit Download
Element DIR
- drwxr-xr-x 2026-01-08 12:54:17
Edit Download
Format DIR
- drwxr-xr-x 2026-01-08 12:54:17
Edit Download
FrontEnd DIR
- drwxr-xr-x 2026-01-08 12:54:17
Edit Download
Template DIR
- drwxr-xr-x 2026-01-08 12:54:17
Edit Download
1.98 KB lrw-r--r-- 2024-04-12 12:40:53
Edit Download
510 B lrw-r--r-- 2024-04-12 12:40:53
Edit Download
7.01 KB lrw-r--r-- 2024-04-12 12:40:53
Edit Download
15.35 KB lrw-r--r-- 2024-04-12 12:40:53
Edit Download
1.18 KB lrw-r--r-- 2024-04-12 12:40:53
Edit Download
2.35 KB lrw-r--r-- 2024-04-12 12:40:53
Edit Download
206 B lrw-r--r-- 2024-04-12 12:40:53
Edit Download
1.45 KB lrw-r--r-- 2024-04-12 12:40:53
Edit Download
144 B lrw-r--r-- 2024-04-12 12:40:53
Edit Download
2.80 KB lrw-r--r-- 2024-04-12 12:40:53
Edit Download
311 B lrw-r--r-- 2024-04-12 12:40:53
Edit Download
209 B lrw-r--r-- 2024-04-12 12:40:53
Edit Download
926 B lrw-r--r-- 2024-04-12 12:40:53
Edit Download
305 B lrw-r--r-- 2024-04-12 12:40:53
Edit Download
676 B lrw-r--r-- 2024-04-12 12:40:53
Edit Download
5.72 KB lrw-r--r-- 2024-04-12 12:40:53
Edit Download
8.01 KB lrw-r--r-- 2024-04-12 12:40:53
Edit Download
388 B lrw-r--r-- 2024-04-12 12:40:53
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).