eval q{use CGI};
error($@) if $@;
+ no warnings "once";
$CGI::DISABLE_UPLOADS=$config{cgi_disable_uploads};
+ use warnings;
if (! $q) {
binmode(STDIN);
# XML::Feed doesn't work around XML::Atom's bizarre
# API, so we will. Real unicode strings? Yes please.
# See [[bugs/Aggregated_Atom_feeds_are_double-encoded]]
+ no warnings 'once';
local $XML::Atom::ForceUnicode = 1;
+ use warnings;
my $c=$entry->content;
# atom feeds may have no content, only a summary
my $dir = $config{srcdir};
if (! $config{autoindex_commit}) {
+ no warnings 'once';
$dir = $IkiWiki::Plugin::transient::transientdir;
}
$file=~s/^\.\/?//;
return unless length $file;
if (IkiWiki::file_pruned($file)) {
+ no warnings 'once';
$File::Find::prune=1;
}
elsif (! -l $_) {
$template->param(month => $month) if defined $month;
$template->param(pagespec => $config{archive_pagespec});
+ no warnings 'once';
my $dir = $IkiWiki::Plugin::transient::transientdir;
+ use warnings;
writefile($pagefile, $dir, $template->output);
}
my $gen;
if (! exists $highlighters{$langfile}) {
+ no warnings 'once';
$gen = highlight::CodeGenerator::getInstance($highlight::XHTML);
+ use warnings;
$gen->setFragmentCode(1); # generate html fragment
$gen->setHTMLEnclosePreTag(1); # include stylish <pre>
if ($data_dir){
}
sub allowed_dirs {
+ no warnings 'once';
return grep { defined $_ } (
$config{srcdir},
$IkiWiki::Plugin::transient::transientdir,
my $dir = $config{srcdir};
if (! $config{tag_autocreate_commit}) {
+ no warnings 'once';
$dir = $IkiWiki::Plugin::transient::transientdir;
}
$page = pagename($file);
if (! exists $pagesources{$page} &&
file_pruned($file)) {
+ no warnings 'once';
$File::Find::prune=1;
return;
}
eval q{use Data::Dumper};
error($@) if $@;
+ no warnings 'once';
local $Data::Dumper::Terse=1;
local $Data::Dumper::Indent=1;
local $Data::Dumper::Pad="\t";
local $Data::Dumper::Quotekeys=0;
# only the perl version preserves utf-8 in output
local $Data::Dumper::Useperl=1;
+ use warnings;
my $dumpedvalue;
if (($type eq 'boolean' || $type eq 'integer') && $value=~/^[0-9]+$/) {
eval q{use YAML::XS};
die $@ if $@;
+ no warnings 'once';
$YAML::XS::QuoteNumericStrings=0;
+ use warnings;
my $dump=decode_utf8(Dump({$key => $value}));
$dump=~s/^---\n//; # yaml header, we don't want
* d/control: remove leading article from Description
(lintian: description-synopsis-starts-with-article)
* d/control: Standards-Version: 3.9.6, no changes required
+ * Silence "used only once: possible typo" warnings for variables
+ that are part of modules' APIs
-- Simon McVittie <smcv@debian.org> Mon, 15 Jun 2015 18:13:23 +0100