Catmandu-AlephX
    
    
  
  
  
view release on metacpan or search on metacpan
lib/Catmandu/AlephX.pm view on Meta::CPAN
    say STDERR join("\n",@{$u->errors});
  }
=head3 special support for catmandu marc records
  when you supply the argument 'marc', an xml document will be created for you,
  and stored in the argument 'xml_full_req'. 'marc' must be an array of arrays.
  When you already supplied 'xml_full_req', it will be overwritten.
=cut
sub update_doc {
  my($self,%args)=@_;
  my $doc_num = $args{doc_num} || $args{doc_number};
  delete $args{$_} for qw(doc_number doc_num);
  $args{doc_num} = $self->format_doc_num($doc_num);
  require Catmandu::AlephX::Op::UpdateDoc;
  $args{op} = Catmandu::AlephX::Op::UpdateDoc->op();
  if($args{marc}){
lib/Catmandu/AlephX.pm view on Meta::CPAN
  my $u = alephx->update_item(%args);
  if($u->is_success){
    say "all ok";
  }else{
    say STDERR join("\n",@{$u->errors});
  }
=cut
sub update_item {
  my($self,%args)=@_;
  require Catmandu::AlephX::Op::UpdateItem;
  $args{op} = Catmandu::AlephX::Op::UpdateItem->op();
  my $res = $self->ua->request(\%args,"POST");
  Catmandu::AlephX::Op::UpdateItem->parse($res->content_ref(),\%args);
}
=head2 create_item
=head3 documentation from Aleph X
( run in 0.345 second using v1.01-cache-2.11-cpan-c333fce770f )