<div dir="ltr">Hi,<div><br></div><div>Thanks a lot for the quick answer and the explanation. </div><div><br></div><div>Have a nice day!</div><div><br></div><div>Emmanuel</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-04-04 15:44 GMT+02:00 Voß, Jakob <span dir="ltr"><<a href="mailto:Jakob.Voss@gbv.de" target="_blank">Jakob.Voss@gbv.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Emmanuel,<br>
<br>
Thanks for pointing to the error in our documentation. I created an issue to fix this:<br>
<br>
<a href="https://github.com/LibreCat/Catmandu/issues/230" rel="noreferrer" target="_blank">https://github.com/LibreCat/Catmandu/issues/230</a><br>
<span class=""><br>
You wrote:<br>
<br>
> sub {<br>
> my ( $data ) = @_;<br>
> foreach my $key (keys %$data) {<br>
> $data->{ $data->{$key } } = $key;<br>
> delete $data->{$key};<br>
> }<br>
> return 3; # <- return a constant<br>
> }<br>
><br>
> And so, I understood that the returned value is apparently not used by Catmandu. And the first argument is in fact a reference.<br>
><br>
> I guess it’s a feature and not a bug, but can anybody confirm it is the right behavior?<br>
<br>
</span>Yes almost: you get a reference of the data to modify and an optional special value $reject. The return value is only checked whether it is equal to $reject or not.<br>
<span class="HOEnZb"><font color="#888888"><br>
Jakob</font></span></blockquote></div><br></div>