Subject: | Problem with the example |
Date: | Wed, 22 Apr 2009 17:42:32 +0200 |
To: | bug-Data-Pareto [...] rt.cpan.org |
From: | Emmanuel Jeannot <emmanuel.Jeannot [...] loria.fr> |
Hi.
I tried the example, but it is not working:
Show quoted text
> more test.pl
use Data::Pareto;
# only first and third columns are used in comparison
# the others are simply descriptive
my $set = new Data::Pareto(columns => [0, 2]);
$set->add(
[ 5, "pareto", 10, 11 ],
[ 5, "dominated", 11, 9 ],
[ 4, "pareto2", 12, 12 ]
);
# this returns [ [ 5, "pareto", 10, 11 ], [ 4, "pareto2",
12, 12 ] ],
# the other one is dominated on selected columns
$set->get_pareto_ref;
Show quoted text > perl test.pl
Can't use string ("columns") as a HASH ref while "strict refs" in use
at /Library/Perl/5.8.8/Data/Pareto.pm line 111.
Can you tell me what's wrong?
Best regards,
--Emmanuel