parent
07bb08d094
commit
3b08789e6f
|
@ -5,18 +5,22 @@ package IkiWiki::Setup::Yaml;
|
||||||
use warnings;
|
use warnings;
|
||||||
use strict;
|
use strict;
|
||||||
use IkiWiki;
|
use IkiWiki;
|
||||||
use YAML;
|
|
||||||
|
|
||||||
sub loaddump ($$) {
|
sub loaddump ($$) {
|
||||||
my $class=shift;
|
my $class=shift;
|
||||||
my $content=shift;
|
my $content=shift;
|
||||||
|
|
||||||
|
eval q{use YAML};
|
||||||
|
die $@ if $@;
|
||||||
IkiWiki::Setup::merge(Load($content));
|
IkiWiki::Setup::merge(Load($content));
|
||||||
}
|
}
|
||||||
|
|
||||||
sub gendump ($@) {
|
sub gendump ($@) {
|
||||||
my $class=shift;
|
my $class=shift;
|
||||||
|
|
||||||
|
eval q{use YAML};
|
||||||
|
die $@ if $@;
|
||||||
|
|
||||||
"# IkiWiki::Setup::Yaml - YAML formatted setup file",
|
"# IkiWiki::Setup::Yaml - YAML formatted setup file",
|
||||||
"#",
|
"#",
|
||||||
(map { "# $_" } @_),
|
(map { "# $_" } @_),
|
||||||
|
|
Loading…
Reference in New Issue