How many Object-Oriented Programmers does it take to change a lightbulb?

You shouldn't be changing the light bulb by hand. If you'd used Electric::Light instead of reinventing the wheel, the Electric::Light::Socket would have noticed the need for a new Electric::Light::Bulb object and instantiated it automatically. By rolling your own implementation, you're likely to get all kinds of edge cases wrong. Can your hand-rolled lightbulb-changing code correctly handle 240V 50Hz current and install the correct sized bulb for the room in question? What about 120V and 60Hz? What if the building's electrical system uses unicode? What if this is an embedded lightbulb running on a small flashlight system? Electric::Light handles all of these details correctly for you. By trying to do this stuff yourself, you're going to repeat every bug that's been ironed out of that module over the years. Will your hand-rolled implementation be tested by millions of people worldwide on dozens of platforms, from LED-based indicator lights all the way up to redundant arrays of airport beacons? No. Use Electric::Light or die.


;$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$;[-1]->();print

In reply to use Electric::Light or die by jonadab
in thread Light Bulb Joke by Cody Pendant

Title:
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, details, 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, summary, 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.