observers
[scpubgit/DKit.git] / t / observe.t
index 8fbac7f..7896be3 100644 (file)
@@ -82,7 +82,7 @@ my @path_status = (
       my $path = $state->scope_var('P')->bound_value;
       $state->return_from_run(
         DX::ObservationRequired->new(
-          observation => sub { $paths{$path} = $observe_path{$path} },
+          observer => sub { $paths{$path} = $observe_path{$path} },
           resume => $state->then($self->next),
         )
       );
@@ -113,7 +113,7 @@ my $or_state = make_state([ 'P', 'PS' ],
 
 my $ob_req = $or_state->run;
 
-$ob_req->observation->();
+$ob_req->observer->();
 
 {
   my $res = $ob_req->resume->run;