disable warnings when evaling setup files
authorJoey Hess <joey@kitenet.net>
Fri, 21 May 2010 17:39:07 +0000 (13:39 -0400)
committerJoey Hess <joey@kitenet.net>
Fri, 21 May 2010 17:39:07 +0000 (13:39 -0400)
In particular, perl warns if a qw{} contains a #, but openids can.

If the setup file has 'use warnings', it will turn warning messages back
on, so it seems reasonable to squelch them by default.

IkiWiki/Setup.pm

index 06102058b1e77a64249ed88a4eaa3d9782069043..ee5be95d2a1cdd2a6a07b8174120e9961755c037 100644 (file)
@@ -33,6 +33,7 @@ sub load ($;$) {
                if ($1) {
                        error sprintf(gettext("cannot load %s in safe mode"), $file)
                                if $safemode;
+                       no warnings;
                        eval IkiWiki::possibly_foolish_untaint($content);
                        error("$file: ".$@) if $@;
                }