Acme-CPANModules-SmartMatch

 view release on metacpan or  search on metacpan

LICENSE  view on Meta::CPAN

TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

                     END OF TERMS AND CONDITIONS

        Appendix: How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.

  To do so, attach the following notices to the program.  It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) 19yy  <name of author>

README  view on Meta::CPAN

    offers a companion to "Switch::Back", a simplified/reimagined version of
    "switch" and smartmatching by simplifying the rules from 23 to just 6.
    The rules still depend on a mix of left and right operands.

    Personal take

    I personally haven't used "switch" all that much in Perl, though I used
    to use quite a bit of smartmatching in the 2010s, mostly the "$str ~~
    @ary_of_strs" variant. I won't use "match::smart" or "Switch::Back" in
    any practical code any time soon (or ever), but which between
    "match::simple" and "Switch::Right" are the best compromise? I guess
    we'll have to see. In the mean time, see my benchmark in
    Bencher::ScenarioBundle::SmartMatch.

    Other modules

    Smart::Match (by LEONT, first released in 2011, pure-perl) offers a
    bunch of functions related to matching. Probably too low-level to use if
    you just want a smart match replacement.

ACME::CPANMODULES ENTRIES

lib/Acme/CPANModules/SmartMatch.pm  view on Meta::CPAN

smartmatching by simplifying the rules from 23 to just 6. The rules still depend
on a mix of left and right operands.


**Personal take**

I personally haven't used `switch` all that much in Perl, though I used to use
quite a bit of smartmatching in the 2010s, mostly the `$str ~~ @ary_of_strs`
variant. I won't use `match::smart` or `Switch::Back` in any practical code any
time soon (or ever), but which between `match::simple` and `Switch::Right` are
the best compromise? I guess we'll have to see. In the mean time, see my
benchmark in <pm:Bencher::ScenarioBundle::SmartMatch>.


**Other modules**

<pm:Smart::Match> (by LEONT, first released in 2011, pure-perl) offers a bunch
of functions related to matching. Probably too low-level to use if you just want
a smart match replacement.

MARKDOWN

lib/Acme/CPANModules/SmartMatch.pm  view on Meta::CPAN

a companion to C<Switch::Back>, a simplified/reimagined version of C<switch> and
smartmatching by simplifying the rules from 23 to just 6. The rules still depend
on a mix of left and right operands.

B<Personal take>

I personally haven't used C<switch> all that much in Perl, though I used to use
quite a bit of smartmatching in the 2010s, mostly the C<$str ~~ @ary_of_strs>
variant. I won't use C<match::smart> or C<Switch::Back> in any practical code any
time soon (or ever), but which between C<match::simple> and C<Switch::Right> are
the best compromise? I guess we'll have to see. In the mean time, see my
benchmark in L<Bencher::ScenarioBundle::SmartMatch>.

B<Other modules>

L<Smart::Match> (by LEONT, first released in 2011, pure-perl) offers a bunch
of functions related to matching. Probably too low-level to use if you just want
a smart match replacement.

=head1 ACME::CPANMODULES ENTRIES



( run in 1.029 second using v1.01-cache-2.11-cpan-4e96b696675 )