develooper Front page | perl.beginners | Postings from April 2010

Re: How to manage large Conditional Statement

Thread Previous | Thread Next
From:
Uri Guttman
Date:
April 21, 2010 11:08
Subject:
Re: How to manage large Conditional Statement
Message ID:
8739you1az.fsf@quad.sysarch.com
>>>>> "MC" == Mimi Cafe <mimicafe@googlemail.com> writes:

  MC> Earlier I thought of using an eval or BEGIN block to evaluate the
  MC> SQL, but then I thought wait a minute, that wouldn't be the
  MC> correct way of using them. Now I see that doing as you guys
  MC> recommended is the right way forward.

a BEGIN block makes no sense here. why would you want to run this at
compile time, maybe even before you connected to the db? don't jump to
such strange conclusion so quickly. BEGIN is useful but not needed that
often. it shouldn't be something you think about to deal with
conditionals.

eval block is for catching errors and dies. it also is not something you
need for code organization.

  MC> Uri: I think the quoting is much a religious issue as everyone has their
  MC> preferred way, but I now know what you meant. :-)

it isn't religious. it is just no one is taught the right way
anymore. it used to be always done this way (in the good very old
day). with the onslaught of redmond and aol the unwashed masses didn't
learn and they swamped the net with top posting. some corps now require
it as they are used to it. some people i know can't do anything but that
(brain lock). smart people will learn the right way if taught and they
usually see its wisdom.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About