Bug 37553: Tidy to make QA tools happy

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
David Cook 2024-08-02 02:02:10 +00:00 committed by Katrin Fischer
parent bf427a2947
commit 1a747ddcb7
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

View file

@ -95,15 +95,15 @@ Specified user must have C<editcatalogue> permission.
sub new {
my $class = shift;
my $self = {@_};
my $self = {@_};
bless $self, $class;
my $url = $self->{url} || die "no url found";
my $user = $self->{user} || die "no user specified";
my $url = $self->{url} || die "no url found";
my $user = $self->{user} || die "no user specified";
my $password = $self->{password} || die "no password";
my $ua = LWP::UserAgent->new();
$ua->cookie_jar({});
$ua->cookie_jar( {} );
my $get_resp = $ua->get("$url/authentication");
my $csrf_token = $get_resp->header('CSRF-TOKEN');
@ -149,11 +149,11 @@ sub get {
=cut
sub post {
my ($self,$biblionumber,$marcxml) = @_;
my ( $self, $biblionumber, $marcxml ) = @_;
my $url = $self->{url};
warn "# post $url/bib/$biblionumber\n" if $self->{debug};
my $csrf_token = $self->{csrf_token};
my $resp = $self->{ua}->post(
my $resp = $self->{ua}->post(
"$url/bib/$biblionumber",
'Content_type' => 'text/xml',
'Csrf_Token' => $csrf_token,