From Wikibooks, open books for an open world
< Introspector
Jump to: navigation, search

The new RDF::Laces module for Perl is designed to allow the statement of RDF triples in Perl using natural perl expressions. For example, here are the first 2 resources from the Dublin Core, in Perl:

       ->title("The Dublin Core Element Set v1.1 namespace providing access to its content by means of an RDF Schema")
       ->publisher("The Dublin Core Metadata Initiative")
       ->description("The Dublin Core Element Set v1.1 namespace provides URIs for the Dublin Core Elements v1.1. Entries are declared using RDF Schema language to support RDF applications.")
       ->comment("A name given to the resource.")
       ->description("Typically, a Title will be a name by which the resource is formally known.")

The module currently prints out the ntriples for every statement made. More info will be forthcoming, as I'm planning to put it on CPAN.