summaryrefslogtreecommitdiff
path: root/IkiWiki/Setup
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2010-03-19 16:09:07 -0400
committerJoey Hess <joey@gnu.kitenet.net>2010-03-19 16:09:07 -0400
commit3b08789e6fb5809dd9b8f51f5c5e7df1d78e6930 (patch)
treebca6ed8b688350a07bdd98ca2afe6c9bd34baa9b /IkiWiki/Setup
parent07bb08d0944a0282d6ed332deeefe347bc88139c (diff)
load YAML on demand
so as not to break test suite if YAML is not avilable
Diffstat (limited to 'IkiWiki/Setup')
-rw-r--r--IkiWiki/Setup/Yaml.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/IkiWiki/Setup/Yaml.pm b/IkiWiki/Setup/Yaml.pm
index ba9192faf..c7ff1988e 100644
--- a/IkiWiki/Setup/Yaml.pm
+++ b/IkiWiki/Setup/Yaml.pm
@@ -5,17 +5,21 @@ package IkiWiki::Setup::Yaml;
use warnings;
use strict;
use IkiWiki;
-use YAML;
sub loaddump ($$) {
my $class=shift;
my $content=shift;
+ eval q{use YAML};
+ die $@ if $@;
IkiWiki::Setup::merge(Load($content));
}
sub gendump ($@) {
my $class=shift;
+
+ eval q{use YAML};
+ die $@ if $@;
"# IkiWiki::Setup::Yaml - YAML formatted setup file",
"#",