Permalink
Browse files

arc_from_arcs() and arc_add() return lists.

  • Loading branch information...
1 parent d0bda59 commit 0672e9e8602bbde39f7a9d49d5c6df63ce66a7f3 @rcaputo committed Jun 29, 2007
Showing with 6 additions and 4 deletions.
  1. +6 −4 trunk/ThirdLobe/ArcStore.pm
@@ -148,12 +148,14 @@ sub arc_store {
$obj = $self->anchor_store($object);
}
- my $arc = $db->arc_from_arcs($sub, $prd, $obj);
- unless ($arc) {
- $arc = $db->arc_add($sub, $prd, $obj);
+ my @arcs = $db->arc_from_arcs($sub, $prd, $obj);
+ unless (@arcs) {
+ @arcs = $db->arc_add($sub, $prd, $obj);
}
- return $arc;
+ die "@arcs" unless @arcs == 1;
+
+ return $arcs[0];
}
=head2 arc_fetch SUBJECT_TEXT, PREDICATE_TEXT, OBJECT_TEXT

0 comments on commit 0672e9e

Please sign in to comment.