diff --git a/lib/AI/DecisionTree.pm b/lib/AI/DecisionTree.pm index 561999f..355d26f 100644 --- a/lib/AI/DecisionTree.pm +++ b/lib/AI/DecisionTree.pm @@ -343,7 +343,7 @@ sub get_result { sub as_graphviz { my ($self, %args) = @_; my $colors = delete $args{leaf_colors} || {}; - require GraphViz; + eval { require GraphViz; } or die $@; my $g = GraphViz->new(%args); my $id = 1;