our %tt_templates;
our %filled_templates;
our $safe;
+our $hole;
our $language;
sub fill_in_template{
my %param = validate_with(params => \@_,
safe => {type => OBJECT,
optional => 1,
},
+ hole_var => {type => HASHREF,
+ optional => 1,
+ },
},
);
- return _fill_in_template(@param{qw(template variables language safe output)});
+ return _fill_in_template(@param{qw(template variables language safe output hole_var)});
}
$language,
$safe,
undef,
+ {},
1
);
};
sub _fill_in_template{
my %param;
- @param{qw(template variables language safe output nosafe)} = @_;
+ @param{qw(template variables language safe output hole_var no_safe)} = @_;
print STDERR "_fill template $param{template} language $param{language} safe $param{safe}\n"
if $DEBUG;
if (defined $param{safe}) {
$safe = $param{safe};
+ if (not defined $hole) {
+ $hole = Safe::Hole->new();
+ }
}
else {
print STDERR "Created new safe\n" if $DEBUG;
${"${root}::$key"} = $param{variables}{$key};
}
}
+ for my $key (keys %{$param{hole_var}||{}}) {
+ $hole->wrap($param{hole_var}{$key},$safe,$key);
+ }
}
#$safe->deny_only();
# perldoc Opcode; for details
scripts_dir := $(DESTDIR)/usr/lib/debbugs
perl_dir := $(DESTDIR)/usr/share/perl5/Debbugs
doc_dir := $(DESTDIR)/usr/share/doc/debbugs
+templates_dir := $(DESTDIR)/usr/share/debbugs/templates
man_dir := $(DESTDIR)/usr/share/man
man8_dir := $(man_dir)/man8
examples_dir := $(doc_dir)/examples
for dir in $(shell seq -w 00 99); \
do test -d $$dir || $(install_exec) -d $$dir; done
+
# install the scripts
$(foreach script,$(scripts_in), $(install_exec) $(script) $(scripts_dir)/$(patsubst scripts/%.in,%,$(script));)
$(install_data) scripts/errorlib.in $(scripts_dir)/errorlib
# install the updateseqs file
$(install_data) misc/updateseqs $(var_dir)/spool
+ # install the templates
+ $(foreach dir $(wildcard templates/*/*) $(install_exec) $(template_dir)/$(patsubst templates/%,%,$(dir)))
+ $(foreach tmpl $(wildcard templates/*/*/*.tmpl) $(install_data) $(template_dir)/$(patsubst templates/%,%,$(tmpl)))
+
+
.PHONY: test
\ No newline at end of file
test_bts --bug 7 --host donbugs.donarmstrong.com
+=head1 DATABASE CREATION
+
+estcmd create -si -xh3 -attr status str -attr subject str \
+ -attr date num -attr submitter str -attr package str \
+ -attr severity str -attr tags str bts
+
=cut
Maintainer: Debbugs developers <debian-debbugs@lists.debian.org>
Uploaders: Josip Rodin <joy-packages@debian.org>, Colin Watson <cjwatson@debian.org>, Don Armstrong <don@debian.org>
Standards-Version: 3.2.1
-Build-Depends-Indep: debhelper, libparams-validate-perl, libmailtools-perl, libmime-perl, libio-stringy-perl, libmldbm-perl, liburi-perl, libsoap-lite-perl, libcgi-simple-perl, libhttp-server-simple-perl, libtest-www-mechanize-perl, libmail-rfc822-address-perl
+Build-Depends-Indep: debhelper, libparams-validate-perl, libmailtools-perl, libmime-perl, libio-stringy-perl, libmldbm-perl, liburi-perl, libsoap-lite-perl, libcgi-simple-perl, libhttp-server-simple-perl, libtest-www-mechanize-perl, libmail-rfc822-address-perl, libsafe-hole-perl
Package: debbugs
Architecture: all
Package: libdebbugs-perl
Architecture: all
-Depends: ${perl:Depends}, libmailtools-perl, ed, libmime-perl, libio-stringy-perl, libmldbm-perl, liburi-perl, libsoap-lite-perl, libcgi-simple-perl, libparams-validate-perl, libtext-template-perl
+Depends: ${perl:Depends}, libmailtools-perl, ed, libmime-perl, libio-stringy-perl, libmldbm-perl, liburi-perl, libsoap-lite-perl, libcgi-simple-perl, libparams-validate-perl, libtext-template-perl, libsafe-hole-perl
Description: modules used by the active Debian BTS
Debian has a bug tracking system which files details of bugs reported by
users and developers. Each bug is given a number, and is kept on file until