From 3b08789e6fb5809dd9b8f51f5c5e7df1d78e6930 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 19 Mar 2010 16:09:07 -0400 Subject: [PATCH] load YAML on demand so as not to break test suite if YAML is not avilable --- IkiWiki/Setup/Yaml.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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", "#",