--- trunk/perl/scripts/cpanest 2005/09/16 14:33:53 20 +++ trunk/perl/scripts/cpanest 2005/09/16 17:26:03 21 @@ -973,11 +973,16 @@ my $self = shift; my $key_v = shift || die "no key?"; - my $doc = HyperEstraier::Document->new; - $doc->add_attr('@uri', 'file:///' . $key_v); - -# $self->{'node'}->edit_doc($doc); - $self->{'node'}->put_doc($doc) or printf STDERR "ERROR: %d\n", $self->{'node'}->status; + my $id = $self->{'node'}->uri_to_id( 'file://' . $key_v ); + + if ($id == -1) { + print STDERR "WARNING: can't delete document uri file://$key_v\n"; + return; + } + + unless ($self->{'node'}->out_doc($id)) { + print STDERR "WARNING: can't out_doc($id)\n"; + } } =head2 delete