Skip to content

Commit

Permalink
Switches to neato only in some cases.
Browse files Browse the repository at this point in the history
Check [this
discussion](https://irclog.perlgeek.de/perl6/2018-03-23#i_15958129)
for background.

(Hopefully) closes #246
  • Loading branch information
JJ committed Mar 23, 2018
1 parent 7fe1758 commit 833d607
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Perl6/TypeGraph/Viz.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ class Perl6::TypeGraph::Viz {
run 'dot', '-V', :!err or die 'dot command failed! (did you install Graphviz?)';
}
die "bad filename '$file'" unless $file;
my $dot = Proc::Async.new(:w, 'dot', '-T', $format, '-o', $file);
my $graphvizzer = ( $file ~~ /Metamodel\:\:/ )??'neato'!!'dot';
say "$graphvizzer for $file";
my $dot = Proc::Async.new(:w, $graphvizzer, '-T', $format, '-o', $file);
my $promise = $dot.start;
await($dot.write(self.as-dot(:$size).encode));
$dot.close-stdin;
Expand Down

0 comments on commit 833d607

Please sign in to comment.