From 7324feab351a815c155e8bc9e4666c21f1c875e3 Mon Sep 17 00:00:00 2001 From: Andrew Pogrebennyk Date: Tue, 3 Oct 2017 13:01:19 +0200 Subject: [PATCH] TT#22250 bin/graph_flow.pl: die in case libgraphviz-perl is not present Change-Id: I2452c3749b056439f42dec59814118317dc53d2d --- bin/graph_flow.pl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/graph_flow.pl b/bin/graph_flow.pl index 7da82626..378b3f31 100755 --- a/bin/graph_flow.pl +++ b/bin/graph_flow.pl @@ -45,13 +45,12 @@ if($#ARGV!=1) die(usage()); } -my $rc = eval +eval { require GraphViz; GraphViz->import(); 1; -}; -return unless $rc; +} or die "You need package libgraphviz-perl to run this program\n"; my $g = GraphViz->new(); my $filename = abs_path($ARGV[0]);