NAME
Papery::Util - Various utilities functions for Papery
SYNOSPSIS
use Papery::Util;
# no exports by default
DESCRIPTION
Papery::Util exists to provide a number of utility functions to other classes in Papery.
FUNCTIONS
Papery::Util provides the following functions:
- merge_meta( $meta, $extra )
-
Merge the keys and values from
$extrainto$meta, and return$meta.The merging scheme is relatively flexible: the keys in the
$extrahash can have a suffix (either+or-, 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.
AUTHOR
Philippe Bruhat (BooK), <book at cpan.org>
COPYRIGHT
Copyright 2010 Philippe Bruhat (BooK), all rights reserved.
LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.