Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Comment on

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

What GrandFather said. I use Perl because it's not all those other construct limited languages that force you to reason like a 50s robot. The length and complexity of the code will change what is easiest to read but in general, this is what I'd say for all simple clauses, so this is what I understand the most easily–

Go shopping later if you can. Take out the trash if it's full. Open the windows if it's too hot.

The inverted statements are sensible of course but they begin to put a lot of weight on the conditional and make you think harder about the potential interpretation(s) of the statement. I also think postfix unless is much easier to follow than the block version.

Go dancing unless you're tired.

Though being Perl, I don't mind seeing the other constructs and don't blame anyone for preferring them. :)


In reply to Re: A matter of style: how to perform a simple action based on a simple condition? by Your Mother
in thread A matter of style: how to perform a simple action based on a simple condition? by muba

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, 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?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    [Discipulus]: hello crew! marto thanks for the message: but I how can I help? i'm testing cpan Padre atm problem with Client::Debug
    [choroba]: I don't happen to have 5.10.0 nor 5.8.5 handy...
    [Corion]: Hmm - I would say the 5.8.5 is a broken installation / corrupt tarball download, and the 5.10.0 is really weird, and maybe a bug in that version of Perl
    [Corion]: I don't see how my $result = eval q{'abc' =~ ?b?}; could create a "Modification of read-only value" error
    [marto]: Discipulus the issue that should be adressed is that the page needs to be updated to reflect modern perl on Windows
    [Discipulus]: but is really necessary to support these ancient versions? from 5.14 onward is not enough?
    [Discipulus]: yes marto I understood
    [Corion]: Discipulus: I'm slowly migrating my code to require 5.8.x ;) Most of my code works on 5.6, but Filter::signatures requires 5.10 I think
    [Corion]: 5.14 is also a good target, widely available and fairly stable. Also, over five years old, which doesn't push people into a needless upgrade cycle
    [Discipulus]: yes I saw your efforts Corion but the pain is worth?

    How do I use this? | Other CB clients
    Other Users?
    Others pondering the Monastery: (10)
    As of 2018-06-25 08:47 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Should cpanminus be part of the standard Perl release?



      Results (126 votes). Check out past polls.

      Notices?