Ask a Question related to PERL Beginners, Design and Development.

  1. #1

    Default Perl Style

    When they say "uncuddled else" are they meaning:

    if () {
    # code
    }
    else {
    # code
    }
    Robert Guest

  2. Similar Questions and Discussions

    1. Need help with Style conversion from Style object to Style key/value collection.
      I am writing a custom control that derives from the DataGrid control. I would like to apply SelectedItemStyles and ItemStyles for use in my derived...
    2. Perl 6 style regular expressions
      I was wondering if anyone has done any work on implementing Perl 6 style regular expressions. Looking at the design docs at...
    3. Are perl-style global variables thread-safe?
      Scripsit illa aut ille »Andreas Schwarz« <usenet.2117@andreas-s.net>: They look thread-safe ruby -e 'Thread.new() do "Hallo" =~ /(.*)/; sleep...
    4. perl style guide
      Besides the one on perldoc.com, does anyone else have any other style guides I can take a look at to get a look at feel for which one I should use?...
    5. What are 'Perl 5 style templates'?
      My client wrote to me... "All scripts must be written in perl 5. Use Perl 5 style templates for all pages and emails associated with the perl...
  3. #2

    Default RE: Perl Style

    I would guess either that or

    if()
    {
    #code
    }
    else
    {
    #more code
    }

    which I have seen, usually by people who primarily code in C.

    -----Original Message-----
    From: Robert [mailto:bobx@linuxmail.org]
    Sent: Sat 1/31/2004 2:24 PM
    To: [email]beginners@perl.org[/email]
    Cc:
    Subject: Perl Style



    When they say "uncuddled else" are they meaning:

    if () {
    # code
    }
    else {
    # code
    }

    --
    To unsubscribe, e-mail: [email]beginners-unsubscribe@perl.org[/email]
    For additional commands, e-mail: [email]beginners-help@perl.org[/email]
    <http://learn.perl.org/> <http://learn.perl.org/first-response>




    Tim Johnson Guest

  4. #3

    Default Re: Perl Style

    On Jan 31, Robert said:
    >When they say "uncuddled else" are they meaning:
    A cuddled else is:

    if (...) {
    ...
    } else {
    ...
    }

    Anything other than THAT is an uncuddled else.

    --
    Jeff "japhy" Pinyan [email]japhy@pobox.com[/email] [url]http://www.pobox.com/~japhy/[/url]
    RPI Acacia brother #734 [url]http://www.perlmonks.org/[/url] [url]http://www.cpan.org/[/url]
    <stu> what does y/// stand for? <tenderpuss> why, yansliterate of course.
    [ I'm looking for programming work. If you like my work, let me know. ]

    Jeff 'Japhy' Pinyan Guest

  5. #4

    Default Re: Perl Style

    Jeff 'Japhy' Pinyan wrote:
    > On Jan 31, Robert said:
    >
    >
    >>When they say "uncuddled else" are they meaning:
    >
    >
    > A cuddled else is:
    >
    > if (...) {
    > ...
    > } else {
    > ...
    > }
    >
    > Anything other than THAT is an uncuddled else.
    >
    Got it. Thanks!
    Robert Guest

  6. #5

    Default Re: Perl Style

    I like cuddled else's. It visually links the logic of the else block to the preceding if statement... while saving vertical space. I think this is an area where it's a matter of preference. Although some people claim that "Larry Wall" likes his else's uncuddled, I doubt, very much, if he gives a ##$@.
    Erik Aronesty is offline Junior Member
    Join Date
    Dec 2010
    Posts
    1

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139