Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Let's start with some background as to what's going on. There are problems with the implementation. The decision of what any given TYPE ~~ TYPE should do is most often unobvious, inconsistent and/or disputed. The idea isn't to remove smart matching; it's to fix it. Specifically, ~~ will be greatly simplified, as you can see in a proposal by the 5.18 pumpking. Decisions as to how two things should match will be done with helpers such as those that already exist in Smart::Match.
Much more readable, much more flexible (fully extensible), and solves a number of problems (such as "When should X be considered a number, and when should it be considered a string?"). So, if you like the feel of given+when, I recommend that you use experimental to disable the warnings and convert your code to use Smart::Match. Smart::Match uses overloaded objects and/or code refs, and that will continue to be supported. I'm hopeful that Smart::Match will be updated if necessary should the details change. In reply to Re: Smart matching is experimental/depreciated in 5.18 - recommendations?
by ikegami
|
|