DTA::CAB::Unify - DTA::CAB unification utiltities
use DTA::CAB::Unify;
$xnew = unifyClone($x);
$xy = unify($x,$y, $OUTPUT_TOP);
$xy = unifyClobber($x,$y, $OUTPUT_TOP);
$xval = _unify1_top($x,$y);
Scalar used by _unify() and friends for incompatible unifications
@EXPORT By default, "unify"(), "unifyClobber"(), and "unifyClone"() are exported
Known tags: :default
(see @EXPORT), :misc
(_unify* subs), :all
(everything)
$xnew = unifyClone($x);
Create a deep clone of an object. Default implementation uses Storable::dclone()
$xy = unify($x,$y, $OUTPUT_TOP);
Wrapper for "_unify_guts"() which clones both $x and $y, and inserts $OUTPUT_TOP for failed unifications.
$xy = unifyClobber($x,$y, $OUTPUT_TOP);
Wrapper for "_unify_guts" which clones both $x and $y, and clobbers old values of $x with new values from $y if unification would produce $TOP.
$xy = _unify($x,$y, $OUTPUT_TOP);
Wrapper for "_unify_guts" which does NOT clone its arguments. Destructively alters $x, adopts literal references from $y where possible.
Does NOT clobber defined values in $x with undef values in $y; to achieve this, set $y values to $TOP and pass $OUTPUT_TOP=undef.
$xy = _unifyClobber($x,$y);
Destructively alters $x, adopts literal references from $y where possible.
$x_altered = _unify_guts($x,$y,\&unify1_sub,$OUTPUT_TOP);
Guts for all unification routines. Destructively alters $x, adopts literal references from $y where possible. \&unify1_sub is called to perform atomic unifications.
$xval = _unify1_top($x,$y);
Default atomic unification subroutine called for simple scalars which inserts $TOP for failed unifications.
$xval = _unify1_clobber($x,$y);
Default atomic unification subroutine called for simple scalars which clobbers $x with $y (maps $TOP to undef).
Bryan Jurish <moocow@cpan.org>
Copyright (C) 2009-2019 by Bryan Jurish
This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.24.1 or, at your option, any later version of Perl 5 you may have available.