Subject: | Inconsistent options settings |
POD appears to me to suggest that in the following two client-code
lines:
$o = new Hash::Flatten(\%options);
$flat = $o->flatten( $nested, \%options );
... that in either case \%options accepts the same options having the
same effects. POD is a little unclear on this point but that's how I
interpret it; this kind of parallel syntax is common and reasonable.
However I find this works:
my $do_hash_flat = Hash::Flatten->new();
$flat = $do_hash_flat->flatten($u, {
EscapeSequence => '#',
DisableEscapes => 1,
});
... while this does not:
my $do_hash_flat = Hash::Flatten->new({
EscapeSequence => '#',
DisableEscapes => 1,
});
$flat = $do_hash_flat->flatten($u);
The latter construct emits:
Hash delimiter cannot contain escape sequence at...
WORKAROUND: Always supply options at point of invocation of object
method, not during object construction. Messy!