aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Lied <boblied+github@gmail.com>2024-03-30 09:04:05 -0500
committerBob Lied <boblied+github@gmail.com>2024-03-30 09:04:05 -0500
commitc72a083852cc12a2d07ec0d582e830053afe5dde (patch)
treed5c3be33bc2c374b77d5a155c29e017b6fd8fa28
parentb799acf6961c45e0cf7a7c18ef0104e6bd5ab8f6 (diff)
downloadperlweeklychallenge-club-c72a083852cc12a2d07ec0d582e830053afe5dde.tar.gz
perlweeklychallenge-club-c72a083852cc12a2d07ec0d582e830053afe5dde.tar.bz2
perlweeklychallenge-club-c72a083852cc12a2d07ec0d582e830053afe5dde.zip
OO solution tidy up
-rw-r--r--challenge-262/bob-lied/perl/ch-1.pl4
1 files 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);