Data-Bucketeer

 view release on metacpan or  search on metacpan

lib/Data/Bucketeer.pm  view on Meta::CPAN

#pod   });
#pod
#pod =cut

sub new {
  my ($class, @rest) = @_;
  unshift @rest, '>' if ref $rest[0];

  my ($type, $buckets) = @rest;

  my @non_num = grep { ! Scalar::Util::looks_like_number($_) or /NaN/i }
                keys %$buckets;

  croak "non-numeric bucket boundaries: @non_num" if @non_num;

  my $guts = bless {
    buckets => $buckets,
    picker  => $class->__picker_for($type),
  };

  return bless $guts => $class;



( run in 0.345 second using v1.01-cache-2.11-cpan-fd5d4e115d8 )