aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-145/e-choroba/blog.txt1
-rwxr-xr-xchallenge-145/e-choroba/perl/ch-2.pl14
2 files changed, 8 insertions, 7 deletions
diff --git a/challenge-145/e-choroba/blog.txt b/challenge-145/e-choroba/blog.txt
new file mode 100644
index 0000000000..ddf1d60a29
--- /dev/null
+++ b/challenge-145/e-choroba/blog.txt
@@ -0,0 +1 @@
+http://blogs.perl.org/users/e_choroba/2022/01/eertree-palindromic-tree.html
diff --git a/challenge-145/e-choroba/perl/ch-2.pl b/challenge-145/e-choroba/perl/ch-2.pl
index 2ee4b431d3..6fffbe2f59 100755
--- a/challenge-145/e-choroba/perl/ch-2.pl
+++ b/challenge-145/e-choroba/perl/ch-2.pl
@@ -6,10 +6,10 @@ use feature qw{ say };
{ package Eertree::Node;
use Moo;
- has length => (is => 'ro', required => 1);
- has pos => (is => 'rwp', required => 1);
- has link => (is => 'rw');
- has edge => (is => 'lazy', builder => sub { {} }, predicate => 1);
+ has length => (is => 'ro', required => 1);
+ has pos => (is => 'rwp', required => 1);
+ has link => (is => 'rw');
+ has edge => (is => 'lazy', builder => sub { {} }, predicate => 1);
sub string {
my ($self, $eertree) = @_;
@@ -21,11 +21,11 @@ use feature qw{ say };
use Moo;
has nodes => (is => 'ro', default => sub { [
- 'Eertree::Node'->new(link => 0, length => -1, pos => -1),
- 'Eertree::Node'->new(link => 0, length => 0, pos => 0)
+ 'Eertree::Node'->new(link => 0, length => -1, pos => -1),
+ 'Eertree::Node'->new(link => 0, length => 0, pos => 0)
]});
has string => (is => 'ro');
- has max => (is => 'rw', default => 0);
+ has max => (is => 'rw', default => 0);
sub node {
my ($self, $index) = @_;