diff options
author | Tobi Oetiker <tobi@oetiker.ch> | 2007-01-13 18:39:57 +0100 |
---|---|---|
committer | Tobi Oetiker <tobi@oetiker.ch> | 2007-01-13 18:39:57 +0100 |
commit | fb2b5def3024bc60f82e2d976a26b3b7a7ba36ab (patch) | |
tree | c57e29d857a18b03f9dbfb7d3ef50136a7731cf9 /lib/Smokeping | |
parent | 6c0ca319ff8ae3a2b4c518e61225a87ccc514228 (diff) | |
download | smokeping-fb2b5def3024bc60f82e2d976a26b3b7a7ba36ab.tar.gz smokeping-fb2b5def3024bc60f82e2d976a26b3b7a7ba36ab.tar.xz |
median was lacking a new method ...
Diffstat (limited to 'lib/Smokeping')
-rw-r--r-- | lib/Smokeping/matchers/Median.pm | 12 |
1 files changed, 12 insertions, 0 deletions
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($) { |