Converting MARC fields with Catmandu - 'unless exists' failing.

2014-06-10 Thread Robin Sheat
I'm attempting to have a fixer that says "if this field hasn't already been set, set it to "0", so I have: unless exists('onloan') add_field('onloan', '0') end This causes the error: can't load fix unless exists('onloan') add_field('onloan', '0') end : coercion for "_fixer" (constructor ar

RE: Converting MARC fields with Catmandu - 'unless exists' failing.

2014-06-10 Thread Patrick Hochstenbach
Hi Robin You just might need to upgrade your Catmandu ("cpan Catmandu") to get the fixed. You are probably using 0.9* syntax features with an older version of Catmandu. As for you second question. Yes, in Catmandu 0.9* all these combinations will work: my $fixer = Catmandu->fixer('do_this