966 |
print STDERR $doc->dump_draft if ($self->{'debug'}); |
print STDERR $doc->dump_draft if ($self->{'debug'}); |
967 |
|
|
968 |
my $id; |
my $id; |
969 |
unless ($id = $self->{'node'}->put_doc($doc)) { |
unless ($self->{'node'}->put_doc($doc)) { |
970 |
printf STDERR "ERROR: %d\n", $self->{'node'}->status; |
printf STDERR "ERROR: %d\n", $self->{'node'}->status; |
971 |
#} else { |
} else { |
972 |
# print STDERR "id: $id\n"; |
$id = $self->{'node'}->uri_to_id( $uri ); |
973 |
|
if ($id != -1) { |
974 |
|
print STDERR "id: $id\n" if ($self->{'debug'}) |
975 |
|
} else { |
976 |
|
print STDERR "ERROR: can't find id for newly insrted document $uri\n"; |
977 |
|
} |
978 |
} |
} |
979 |
|
|
980 |
return $id; |
return $id; |