Git Product home page Git Product logo

yaml-libyaml-perl6's Introduction

Perl6 LibYAML

Build Status

A Perl 6 interface to LibYAML, a YAML 1.1 parser and emitter.

INSTALLATION

You must get and install libyaml first. Then you can install LibYAML with zef:

zef install LibYAML

Install from Sources

You can install this LibYAML module from source (optionally also using the libyaml C code sources) like this:

$ git clone https://github.com/yaml/yaml-libyaml-perl6
$ git clone https://github.com/yaml/libyaml
$ (cd libyaml; make -f .makefile)
$ export LD_LIBRARY_PATH=$PWD/libyaml/src/.libs
$ cd perl6-libyaml
$ zef install .

Examples

Note: This is a parser and emitter. The interface will probably change. If you want to load and dump YAML, take a look at YAML.pm6.

use LibYAML;

my $parser = LibYAML::Parser.new;

my $emitter = LibYAML::Emitter.new(...options...);

Originally LibYAML combined loading and parsing, dumping and emitting. The load and dump parts have been extracted, modified and moved to yaml/yaml-perl6.

Documentation will be added when we figure out the API we want to use.

Emitter options

:encoding = YAML_ANY_ENCODING
            YAML_UTF8_ENCODING (default)
            YAML_UTF16LE_ENCODING
            YAML_UTF16BE_ENCODING

:sequence-style = YAML_BLOCK_SEQUENCE_STYLE (default)
                  YAML_FLOW_SEQUENCE_STYLE

:mapping-style = YAML_BLOCK_MAPPING_STYLE (default)
                 YAML_FLOW_MAPPING_STYLE

:header or :!header  Output `---` header (default if more than one object output)

:footer or :!footer  Output `...` footer (default false)

:canonical or :!canonical

:indent = 2 .. 9 (default 2)

:width = width of line, default = -1, infinite

:unicode or :!unicode (default True)

:break = YAML_LN_BREAK (default)
         YAML_CR_BREAK
         YAML_CRLN_BREAK

Errors

Throws exceptions X::LibYAML::Parser-Error or X::LibYAML::Emitter-Error on error.

SEE ALSO

YAMLish is a pure-perl6 module for YAML that doesn't rely on an external library like LibYAML does.

YAML.pm6 is a loader and dumper, which uses LibYAML as a backend.

yaml-libyaml-perl6's People

Contributors

curttilmes avatar ingydotnet avatar perlpunk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

seanpm2001

yaml-libyaml-perl6's Issues

Will no longer be updated to the Raku ecosystem

Hello,

Thank you for the time and effort you have put in what is now the Raku Programming Language. The language and its ecosystem are moving forward.

This means that this distribution will no longer be checked for updates by the Raku ecosystem.

This means that you will need to move your module to the zef ecosystem on the next update you make to these distributions. Otherwise your update will simply not be seen by the ecosystem.

If you are no longer interested in maintaining this distribution, you can have this distribution moved to Raku Community Modules Adoption Center, where members of the Raku Community will take care of them.

This can be as easy as confirming that in a response to this issue.

Again, thank you for your time and efforts!

On behalf of the Raku Steering Council,

Elizabeth Mattijsen

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.