Catmandu 1.01

Catmandu 1.01 has been released today. There has been some speed improvements processing fixes due to switching from the Data::Util to the Ref::Util package which has better a support on many Perl platforms.

For the command line there is now support for preprocessing  Fix scripts. This means, one can read in variables from the command line into a Fix script. For instance, when processing data you might want to keep some provenance data about your data sources in the output. This can be done with the following commands:


$ catmandu convert MARC --fix myfixes.fix --var source=Publisher1 
--var date=2014-2015 < data.mrc

with a myfixes.fix like:


add_field(my_source,{{source}})
add_field(my_data,{{date}})
marc_field(245,title)
marc_field(022,issn)
.
.
.
etc
.
.

Your JSON output will now contain the clean ‘title’ and ‘issn’ fields but also for each record a ‘my_source’ with value ‘Publisher1’ and a ‘my_date’ with value ‘2014-2015’.

By using the Text::Hogan compiler full support of the mustache language is available.

In this new Catmandu version there have been also some new fix functions you might want to try out, see our Fixes Cheat Sheet for a full overview.

 

Leave a comment