Skip to content

Commit

Permalink
Merge pull request #375 from manwar/improved-code-for-day-14
Browse files Browse the repository at this point in the history
Improved code as suggested by Paul Evans.
  • Loading branch information
oalders authored Dec 14, 2023
2 parents 72ddbf9 + efc8c08 commit 6caee49
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions 2023/articles/2023-12-14.pod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Topic: use experimental 'class'
=head2 Background

I have followed the last 2 releases of Perl i.e. C<Perl v5.36> and C<Perl v5.38>
very closely. C<Perl v5.36> was released on C<2022-05-28>with much fanfare as it
very closely. C<Perl v5.36> was released on C<2022-05-28> with much fanfare as it
had so much nice new features introduced. If you haven't had chance to play with
then I have compiled some for you. Please L<check out|https://github.com/manwar/perl-cool-snippets?tab=readme-ov-file#perl-v536> this collection for quick introduction.

Expand Down Expand Up @@ -75,9 +75,8 @@ external modules as seen in the code below:
}

class SingleObject :isa(Singleton) {
field $count :param = 0;
field $_count = $count;
method counter { ++$_count }
field $count :param = 0;
method counter { ++$count }
}

say SingleObject->instance->counter;
Expand Down

0 comments on commit 6caee49

Please sign in to comment.