tracks/perl6/bin/exercise-gen.pl6 in trackler-2.2.1.53 vs tracks/perl6/bin/exercise-gen.pl6 in trackler-2.2.1.54

- old
+ new

@@ -1,9 +1,9 @@ #!/usr/bin/env perl6 use v6; use Template::Mustache; -use YAMLish; +use YAML::Parser::LibYAML; my $base-dir = $?FILE.IO.resolve.parent.parent; my @exercises; if $base-dir.child('problem-specifications') !~~ :d { @@ -31,17 +31,16 @@ for @exercises -> $exercise { if (my $exercise-dir = $base-dir.child("exercises/$exercise")) !~~ :d { push @dir-not-found, $exercise; next; } - if (my $yaml = $exercise-dir.child('example.yaml')) !~~ :f { + if (my $yaml-file = $exercise-dir.child('example.yaml')) !~~ :f { push @yaml-not-found, $exercise; next; }; print "Generating $exercise... "; - my %data = load-yaml $yaml.slurp; - $_=.chomp when Str for @(%data.values); + my %data = yaml-parse $yaml-file.absolute; my $cdata = $base-dir.child("problem-specifications/exercises/$exercise/canonical-data.json"); if $cdata ~~ :f {%data<cdata><json> = $cdata.slurp} create-file "$exercise.t", 'test';