The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

EventStore::Tiny::DataEvent

REFERENCE

EventStore::Tiny::DataEvent extends EventStore::Tiny::Event and implements the following additional attributes and methods.

data

    my $ev = EventStore::Tiny::DataEvent->new(data => {id => 42});

Sets concrete data for this event which will be used during application.

new_from_template

    my $concrete = EventStore::Tiny::DataEvent->new_from_template(
        $event, {id => 17}
    );

Creates a new data event based on an event (usually representing an event type which was registered before using "register_event" in EventStore::Tiny).

apply_to

    $event->apply_to(\%state, $logger);

Applies this event's transformation to the given state (by side-effect) and its "data". If a $logger as a subref is given, it is used to log this application.

SEE ALSO

EventStore::Tiny

COPYRIGHT AND LICENSE

Copyright (c) 2018 Mirko Westermeier (mail: mirko@westermeier.de)

Released under the MIT License (see LICENSE.txt for details).