switch binding to use value_path
[scpubgit/DX.git] / lib / DX / ActionBuilder / Null.pm
index 0ac25b7..b7b2738 100644 (file)
@@ -6,6 +6,12 @@ with 'DX::Role::ActionBuilder';
 
 has target_path => (is => 'ro');
 
+around target_path => sub {
+  my ($orig, $self) = (shift, shift);
+  return undef unless ref($self);
+  return $self->$orig(@_);
+};
+
 sub can_set_value { 0 }
 
 sub action_for_set_value { undef }