Justin Hunter > Class-Workflow-0.11_01 > Class::Workflow::Util::Delta

Download:
Class-Workflow-0.11_01.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source  

NAME ^

Class::Workflow::Util::Delta - calculate deltas between workflow instances

SYNOPSIS ^

        my $next = $transition->apply( $i );

        my $d = Class::Workflow::Util::Delta->new(
                from => $i,
                to   => $next,
        );

        foreach my $field ( keys %{ $d->changes } ) {
                my $change = $d->changes->{$field};
                print "$field changed from $change->{from} to $change->{to}\n";
        }

DESCRIPTION ^

Usually you need to calculate deltas between workflow instances in order to normalize the database of history changes so that there are no duplicate fields.

This module lets you create an object that represents the change between any two instances (not necessarily related), allowing you to represent a history step.

See Class::Workflow::YAML

syntax highlighting: