X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=examples%2F4charts.pl.in;h=a11b944185db50684b70ed918863d793f0346072;hp=7249b07aac48a2d7d8f579d82870c00b1ea2ef3f;hb=c14d8b6f092d8af34a94c07223d685b5a8369e16;hpb=a4e465de6b8cb972864ec1636bef470dd1173d89 diff --git a/examples/4charts.pl.in b/examples/4charts.pl.in index 7249b07..a11b944 100755 --- a/examples/4charts.pl.in +++ b/examples/4charts.pl.in @@ -1,15 +1,14 @@ #! @PERL@ #makes things work when run without install -use lib qw( ../bindings/perl-shared/blib/lib ../bindings/perl-shared/blib/arch ); -# this is for after install -use lib qw( @prefix@/lib/perl ../lib/perl ); +use lib qw( @prefix@/lib/perl ); use RRDs; my $start=time; my $rrd="randome.rrd"; my $name = $0; +$name =~ s/.*\///g; $name =~ s/\.pl.*//g; RRDs::create ($rrd, "--start",$start-1, "--step",300, @@ -118,7 +117,7 @@ RRDs::graph "$name-sample.png", ; if ($ERROR = RRDs::error) { - print "ERROR: $ERROR\n"; + die "ERROR: $ERROR\n"; }; print "This script has created $name.png in the current directory\n";