ach(sub { my $hashref = $_[0]; # ... }); To convert BagIt directories into a JSON representation with the L<catmandu> command line client: # Use a glob to find all directorie