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

NAME

EventStore::Tiny::TransformationStore

REFERENCE

EventStore::Tiny::TransformationStore implements the following methods.

METHODS

names

    my @event_names = $ts->names;

Returns a sorted list of all stored event names.

get

    my $transformation = $ts->get('Foo');

Returns the transformation subroutine (as a coderef) for the given name. If no corresponding transformation subroutine could be found, it returns undef.

set

    $ts->set(Foo => sub {
        my ($state, $data) = @_;
        # manipulate $state
    });

Registers a transformation subroutine under a given name in the store. It should change the given state argument (as a hashref) based on the given data (as a hashref) by side-effect.

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).