map [ $_, $dict->get_member_at($_) ], $dict->index_list
], $meta);
return '{{ }}' unless $chunks =~ /\S/;
+ s/^\s+//, s/\n\s+/ /g for (my $maybe = $chunks);
+ return "{{ ${maybe} }}" if length($maybe) < $meta->{width_left};
"{{\n${chunks}\n}}";
}
my ($self, $pairs, $meta) = @_;
my $chunks = $self->_fmt_pairs($pairs, $meta);
return '{ }' unless $chunks =~ /\S/;
+ s/^\s+//, s/\n\s+/ /g for (my $maybe = $chunks);
+ return "{ ${maybe} }" if length($maybe) < $meta->{width_left};
"{\n${chunks}\n}"
}
my ($self, $rps, $meta) = @_;
$self->_fmt_object([
map {
- [ $_, $rps->dependencies_for($_) ]
+ [ $_, [
+ map bless([ @$_ ], 'DX::Dependency'),
+ map @{$_}[1..$#$_],
+ @{$rps->dependencies_for($_)}
+ ] ]
} @{$rps->propositions},
], $meta);
}
+sub _fmt_dependency {
+ my ($self, $dep, $meta) = @_;
+ '{ '.join(' ', map $self->_fmt($_, $meta), @$dep).' }'
+}
+
sub _fmt_proposition {
my ($self, $prop, $meta) = @_;
join ' ',