Skip to content

Commit

Permalink
Clarify deprecation note on new_anon
Browse files Browse the repository at this point in the history
  • Loading branch information
bbrtj committed Jul 5, 2024
1 parent e5d5540 commit e8c2c4f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ Revision history for Kelp
[Changes]
- Fixed incorrect before_finalize class if last handler to execute did not belong to a controller

[Deprecations]
- Clarify that new_anon will not be removed, but rather use different implementation method in the future

[New Documentation]
- Kelp::Context package is now documented
- Kelp::Manual::Controllers has a new section: 'Use different method than reblessing'
Expand Down
10 changes: 7 additions & 3 deletions lib/Kelp.pm
Original file line number Diff line number Diff line change
Expand Up @@ -688,9 +688,13 @@ A standard constructor. B<Cannot> be called multiple times: see L</new_anon>.
my $kelp1 = KelpApp->new_anon(config => 'conf1');
my $kelp2 = KelpApp->new_anon(config => 'conf2');
B<Deprecated>. This only solves the problem in non-controller scenario and will
completely break with reblessing. It's usually better to treat every Kelp app
more or less like a singleton.
B<Deprecated>. This only solves the problem in a basic scenario and has a
critical bug when it comes to subclassing and reblessing the app. The
C<new_anon> constructor itself will not be removed, but its internals will be
modified to use a more robust implementation method. It is not guaranteed to
work exactly the same for your use case with the new method. It's usually
better to treat every Kelp app like a singleton since that's how it was
designed.
A constructor that can be called repeatedly. Cannot be mixed with L</new>.
Expand Down

0 comments on commit e8c2c4f

Please sign in to comment.