Papery::Util - Various utilities functions for Papery
use Papery::Util; # no exports by default
Papery::Util exists to provide a number of utility functions to other classes in Papery.
Papery::Util provides the following functions:
- merge_meta( $meta, $extra )
Merge the keys and values from
$meta, and return
The merging scheme is relatively flexible: the keys in the
$extrahash can have a suffix (either
-, which of course means that no key in the Papery metadata can end with those characters).
A key without suffix is simply a replacement.
If the value is a string, and the suffix is
+, the string is appended to the original. If the suffix is
-, the string is prepended to the original.
If the value is an array, and the suffix is
+, the array content is pushed to the end of the original. If the suffix is
-, the array content is inserted at the beginning of the original.
Philippe Bruhat (BooK),
<book at cpan.org>
Copyright 2010 Philippe Bruhat (BooK), all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.