From c72a083852cc12a2d07ec0d582e830053afe5dde Mon Sep 17 00:00:00 2001 From: Bob Lied Date: Sat, 30 Mar 2024 09:04:05 -0500 Subject: OO solution tidy up --- challenge-262/bob-lied/perl/ch-1.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/challenge-262/bob-lied/perl/ch-1.pl b/challenge-262/bob-lied/perl/ch-1.pl index 01fe3e4b32..008a36c59c 100644 --- a/challenge-262/bob-lied/perl/ch-1.pl +++ b/challenge-262/bob-lied/perl/ch-1.pl @@ -33,7 +33,7 @@ class Bucket { ADJUST { ++$id } field $name :param = "Bucket$id"; - field $condition :param = sub() { true }; + field $condition :param = sub($n) { true }; field $_count = 0; method contains($n) { @@ -61,7 +61,6 @@ sub mpn(@ints) return $buckets->biggestNum(); } -say mpn(-3, 0, 1, 9, 11); use Getopt::Long; my $Verbose = 0; @@ -70,6 +69,7 @@ my $DoTest = 0; GetOptions("test" => \$DoTest, "verbose" => \$Verbose); exit(!runTest()) if $DoTest; +say "OO solution: ", mpn(@ARGV); say maxPosNeg(@ARGV); -- cgit