LibreCat / Catmandu-MARC

Catmandu modules for working with MARC data
https://metacpan.org/release/Catmandu-MARC
Other
8 stars 10 forks source link

marc_set("FMT", ...) does not work correctly #79

Closed CaptSolo closed 6 years ago

CaptSolo commented 6 years ago

The value of "FMT" field can not be changed correctly using marc_set():

Fix: marc_set("FMT", "AU")

Input data:

      [
         "FMT",
         " ",
         " ",
         "_",
         "BK"
      ],

Result:

      [
         "FMT",
         " ",
         " ",
         "_",
         "BK",
         "a",
         "AU"
      ],
CaptSolo commented 6 years ago

Workaround: set_field(record.0.4, 'AU')

phochste commented 6 years ago

The correct syntax is:

marc_set(FMT_,AU)

But I'll see if I can add default support for what you try to do

CaptSolo commented 6 years ago

I tried marc_set(FMT_,AU) but it did not work correctly either :

      [
         "FMT",
         " ",
         " ",
         "_",
         "BK",
         "[_]",
         "AU"
      ],
phochste commented 6 years ago

Can you see which version of Catmandu::MARC you have?

$ catmandu info | grep Catmandu::MARC
phochste commented 6 years ago

Version 1.17 is on its way to CPAN

CaptSolo commented 6 years ago

My mistake: I had an old version in a Docker image.

Both versions – marc_set(FMT_,AU) and marc_set("FMT", "AU") – work fine with version 1.161.

Sorry for the confusion.