Skip Menu |

This queue is for tickets about the RDF-Simple CPAN distribution.

Report information
The Basics
Id: 37335
Status: resolved
Worked: 10 min
Priority: 0/
Queue: RDF-Simple

People
Owner: Nobody in particular
Requestors: MTHURN [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.3
Fixed in: (no value)



Subject: make_object() needs to copy its arguments
The make_object() function uses an alias of its arguments (in the @triples variable). Unfortunately, this can cause errors such as "Modification of a read-only value attempted" at the call to serialise() if the caller sends in any kind of reference (or something like that). IMO this places undo burden on the caller to have to make sure all his arrays are in just the right form. If you use the following code, it works like a charm: my $self = shift; # Make a copy of our array-ref arguments, # so we can modify them locally: my @triples; foreach my $ra (@_) { push @triples, [@$ra]; } # foreach
Change applied, will appear in next release.