Acme-CPANModules-SmartMatch

 view release on metacpan or  search on metacpan

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 0.590 second using v1.01-cache-2.11-cpan-702932259ff )