Commits

barbasa committed 8ef9804

Smoother subclasses has to be instantiated by the base class

Comments (0)

Files changed (3)

Statistics-Descriptive/lib/Statistics/Descriptive/Smoother.pm

     eval "require $sub_class";
     die "No such class $sub_class: $@" if $@;
 
-    return $sub_class->new({
+    return $sub_class->_new({
         data       => $ra_data,
         samples    => $ra_samples,
         count      => scalar @$ra_data,

Statistics-Descriptive/lib/Statistics/Descriptive/Smoother/Exponential.pm

     
 our $VERSION = '3.0500';
     
-sub new {
+sub _new {
     my ($class, $args) = @_;
         
     return bless $args || {}, $class;

Statistics-Descriptive/lib/Statistics/Descriptive/Smoother/Weightedexponential.pm

 
 our $VERSION = '3.0500';
 
-sub new {
+sub _new {
     my ($class, $args) = @_;
 
     if (scalar @{$args->{data}} != scalar @{$args->{samples}}) {