From fb2b5def3024bc60f82e2d976a26b3b7a7ba36ab Mon Sep 17 00:00:00 2001 From: Tobi Oetiker Date: Sat, 13 Jan 2007 17:39:57 +0000 Subject: median was lacking a new method ... --- lib/Smokeping/matchers/Median.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/Smokeping') diff --git a/lib/Smokeping/matchers/Median.pm b/lib/Smokeping/matchers/Median.pm index 65d71e2..7dbad43 100644 --- a/lib/Smokeping/matchers/Median.pm +++ b/lib/Smokeping/matchers/Median.pm @@ -56,6 +56,18 @@ use vars qw($VERSION); $VERSION = 1.0; use Carp; +sub new(@) +{ + my $class = shift; + my $rules = { + old=>'\d+', + new=>'\d+', + diff=>'\d+(\.\d+)?' }; + + my $self = $class->SUPER::new($rules,@_); + return $self; +} + # how many values does the matcher need to do it's magic sub Length($) { -- cgit v1.2.3-24-g4f1b