Help language development. Donate to The Perl Foundation

RDF::Turtle cpan:BDUGGAN last updated on 2018-08-06
# RDF::Turtle

[![Build Status](](

# Description

This is a parser for the Terse RDF Triple Language.

See [](

Sample usage of RDF::Turtle:

my $parsed = parse-turtle('file.ttl'.IO.slurp);
my $triples = $parsed.made;
for @$triples -> ($subject, $predicate, $object) {
    say "$subject $predicate $object .";

Also included is a sample command line parser, [eg/parse.p6](

Sample usage:

Parse a TTL file:

    ./eg/parse.p6 input.ttl

Convert to N-triples format:

    ./eg/parse.p6 input.ttl --triples

The spec tests are included in [t/tests](  As of this
writing, all of the good tests are parsed, and some of the correct
outputs are generated.