NAME

FP::Struct::Equal -- automatic Equal protocol implementation

SYNOPSIS

    package FP_Struct_Equal_Example::Foo {

        use FP::Struct ["a","b"],
          'FP::Struct::Equal';

        _END_
    }

    FP_Struct_Equal_Example::Foo::constructors->import;
    use FP::Equal;
    ok equal(Foo(1, [1+1, 3]), Foo(1, [2, 3]));
    ok not equal(Foo(1, 1+1), Foo(1, [3]));

DESCRIPTION

This class, when listed as a superclass of an FP::Struct, automatically implements the FP::Abstract::Equal protocol (i.e. generates an `FP_Equal_equal` method that uses inspection specific to FP::Struct classes to get to know the public field values of the object it is being called on, and reconstructs a constructor call based on this information.) This will be the right thing for the typical `FP::Struct` based class that don't have or mutate hidden fields or want to exclude some fields from equality tests.

SEE ALSO

Creates implementations for: FP::Abstract::Equal

FP::Struct::Show

NOTE

This is alpha software! Read the status section in the package README or on the website.