Skip to content

Commit f41f05c

Browse files
committed
update docs
1 parent 5686dc1 commit f41f05c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/RDF/LinkedData.pm

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,10 @@ Returns or sets the last Etag of so that changes to the model can be detected.
240240
has last_etag => ( is => 'rw', isa => Str, predicate => 'has_last_etag');
241241

242242

243-
=item namespaces ( { skos => 'http://www.w3.org/2004/02/skos/core#', dct => 'http://purl.org/dc/terms/' } )
243+
=item namespaces ( $namespace_map )
244244
245-
Gets or sets the namespaces that some serializers use for pretty-printing.
245+
Gets or sets the namespaces that some serializers use for
246+
pretty-printing. Should be handed a L<URI::NamespaceMap> object.
246247
247248
=cut
248249

@@ -260,8 +261,9 @@ sub _build_namespaces {
260261
my ($self, $ns_hash) = @_;
261262
my $map = URI::NamespaceMap->new(['rdf', 'void', 'dct']);
262263
while (my ($name, $uri) = each %{$ns_hash}) {
263-
$self->add_namespace_mapping($name => $uri);
264+
$map->add_mapping($name => $uri);
264265
}
266+
warn Data::Dumper::Dumper($map)
265267
return $map;
266268
}
267269

@@ -351,6 +353,7 @@ sub response {
351353
}
352354
$self->add_namespace_mapping(hydra => 'http://www.w3.org/ns/hydra/core#');
353355
my $cl = literal($counter, undef, 'http://www.w3.org/2001/XMLSchema#integer');
356+
warn Data::Dumper::Dumper($self->list_namespaces);
354357
my $void = $self->namespaces->void;
355358
$output_model->add_statement(statement(iri($uri),
356359
iri($void->triples),

0 commit comments

Comments
 (0)