=encoding utf8

=head1 NAME

Couch::DB::Util - utility functions

=head1 INHERITANCE

 Couch::DB::Util
   is an Exporter

=head1 SYNOPSIS

  use Couch::DB::Util;           # obligatory!
  use Couch::DB::Util  qw(flat); # alternative

=head1 DESCRIPTION

All modules in CouchDB B<must import> this module, because it also offers
additional features to the namespace, like 'warnings' and 'strict'.

=head1 Functions

=over 4

=item B<apply_tree>($tree, CODE)

Apply the C<CODE> to all elements in the C<$tree>.  Returns a new tree.

=item B<flat>(LIST|ARRAY)

Returns all defined elements found in the C<LIST> or C<ARRAY>.  The parameter
C<LIST> may contain ARRAYs.

=item B<pile>(LIST|ARRAY)

Create a new C<ARRAY> from the offered arguments, combining all elements
from the C<LIST> and ARRAYs.  Undefined elements are removed.

=item B<simplified>($name, $data)

Returns a Data::Dumper output, which is a simplified version of the C<$data>.
A normal dump would show internals of objects which make the output very verbose,
hence harder to interpret.

=back

=head1 SEE ALSO

This module is part of Couch-DB version 0.201,
built on January 30, 2026. Website: F<http://perl.overmeer.net/CPAN/>

=head1 LICENSE

For contributors see file ChangeLog.

This software is copyright (c) 2024-2026 by Mark Overmeer.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

