Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

My thesis is that the Switch module should be marked deprecated.

One will find that many Perl Monks advise fellow programmers not to use the Switch module in any Perl program that even hints at eventually becoming production status source code. (The evidence is in the paragraphs below.)

This proposed deprecation marking is for the benefit of beginning and intermediate Perl programmers.

In most cases, advanced Perl programmers know better than to use it in serious source code, because many of them spend time at Perl Monks , stackoverflow, or in IRC channels devoted to Perl programming and see the (sad) results of beginning and intermediate Perl programmers being lured into using this module.

Let me mention its history, briefly. The Switch module was once a core module in Perl. (Of course, one can use corelist to get the details.)

% corelist Switch Data for 2016-06-20 Switch was first released with perl v5.7.3, deprecated (will be CPAN-o +nly) in v5.11.0 and removed from v5.13.1

One more administrative detail to deal with here: This review is part of a larger project to deprecate the Switch module. For details, please read this post describing a step by step recipe for deprecating this module (or any module) by hippo.

Below, I offer some hyperlinks that (I hope) will convince the reader that the Switch module should be deprecated.

I have "set the table". By now, the reader should be thinking "Such a strange module with a strange history". If you are "ready to dine", please read on.

In the recent post by hippo entitled Re^7: Perl Code Changes Behavior if Two Subroutine definitions are swapped, he references a Switch module bug report:

If the reader is still here at this point, it must be because he/she craves still more detail, because the bug report mentioned above should have satiated most of the audience. But, I can offer more for those that are "still hungry".

Here are some Perl Monks threads on the subject. It is not a complete list. For this task, I did a Google search with a query of switch.

I hope that this review has convinced the reader that the Switch module should be marked deprecated.

In reply to Switch by Cow1337killr

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others about the Monastery: (5)
    As of 2020-02-24 03:40 GMT
    Find Nodes?
      Voting Booth?
      What numbers are you going to focus on primarily in 2020?

      Results (104 votes). Check out past polls.