From: Joey Hess Date: Fri, 19 Mar 2010 20:09:07 +0000 (-0400) Subject: load YAML on demand X-Git-Tag: 3.20100403~129 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3b08789e6fb5809dd9b8f51f5c5e7df1d78e6930;p=ikiwiki.git load YAML on demand so as not to break test suite if YAML is not avilable --- 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", "#",