X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=examples%2Fminmax.pl.in;h=3fd0e65ca5c7611e59b5f063fe88af015e3d86eb;hp=87973d25ec131dd647bbbd80d3a631013d76eae8;hb=d4110e29da41ce702bcc3327e86768c6f266915e;hpb=5837606887a6d81e8b1f7588525cb1c8783fb62b diff --git a/examples/minmax.pl.in b/examples/minmax.pl.in index 87973d2..3fd0e65 100755 --- a/examples/minmax.pl.in +++ b/examples/minmax.pl.in @@ -1,14 +1,12 @@ #! @PERL@ -#makes things work when run without install -use lib qw( ../libraries/perl-shared/blib/lib ../libraries/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, @@ -46,9 +44,9 @@ RRDs::graph "$name.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"; -print "This demonstrates the use of the TIME and % RPN operators\n"; +print "This demonstrates the use of MIN and MAX archives\n";