~mclehman/raku-kludges

4162b35ec09e1d7fe64d805257e23fb31c7d975c — 0xFORDCOMMA 4 years ago master
Initial commit.
2 files changed, 26 insertions(+), 0 deletions(-)

A META6.json
A lib/Kludges/YAML.rakumod
A  => META6.json +18 -0
@@ 1,18 @@
{
  "api": 0,
  "authors": [
    "0xford"
  ],
  "description": "",
  "license": "https://opensource.org/licenses/GPL-3.0",
  "name": "Kludges",
  "perl": "6.d",
  "production": false,
  "provides": {
    "Kludges::YAML": "lib/Kludges/YAML.rakumod"
  },
  "scripts": {
    "test": "zef test ."
  },
  "version": "2020.01.17"
}

A  => lib/Kludges/YAML.rakumod +8 -0
@@ 1,8 @@
unit module Kludges::YAML;

use JSON::Fast;

# This mess works around improper YAML parsing in Perl 6 :(
sub parse-yaml-file($path) is export {
    return from-json shell("yaml2json < $path", :out, :err).out.slurp;
}