X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDX%2FResolution.pm;h=36066332be93fa80a858751cca7304701e884d6e;hb=c99dbb05d5cbafccac051a6877424dacd050ad06;hp=9e67d4d2f2bbe8c0e01ec6fa7e5d2a2d34aeb3da;hpb=e220a64b3e0f0955ab6baa92e962d4a714709580;p=scpubgit%2FDX.git diff --git a/lib/DX/Resolution.pm b/lib/DX/Resolution.pm index 9e67d4d..3606633 100644 --- a/lib/DX/Resolution.pm +++ b/lib/DX/Resolution.pm @@ -1,5 +1,6 @@ package DX::Resolution; +use DX::Utils qw(expand_deps); use DX::Class; has veracity_depends_on => (is => 'ro', required => 1); @@ -10,4 +11,22 @@ sub next_resolution { $_[0] } sub remainder { () } +sub for_deparse { + my ($self) = @_; + [ statement => [ + [ symbol => 'resolution' ], + [ pairs => [ + (@{$self->actions} + ? [ actions => [ block => $self->actions ] ] + : ()), + [ veracity_depends_on => [ block => [ + map [ statement => [ + [ symbol => (split '::', ${$_->[0]})[-1] ], + [ value_path => [ @{$_}[1..$#$_] ] ], + ] ], @{expand_deps($self->veracity_depends_on)} + ] ] ], + ] ], + ] ]; +} + 1;