Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: What to use instead of global variables

by educated_foo (Vicar)
on Mar 28, 2012 at 01:49 UTC ( #962045=note: print w/replies, xml ) Need Help??

in reply to What to use instead of global variables

I'm trying to write code to comply with Perl best practices...
Please don't do this. As the quote at the top of the page says, "P is for Practical." Write your programs to solve your problems, not to please language scolds on the internet.
  • Comment on Re: What to use instead of global variables

Replies are listed 'Best First'.
Re^2: What to use instead of global variables
by Anonymous Monk on Mar 28, 2012 at 20:43 UTC

    While you have a point (do not follow style for style's sake), these "language scolds" are quite correct when the goal is to write maintainable code. (And it should be, for any non-small program!) If you think you will never have to revisit your code to fix or improve it (say, a one-time script), you are indeed free to ignore best practises and just write something that works.

    Thus spake the master programmer:
    "Though a program be but three lines long, someday it will have to be maintained."

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://962045]
[perldigious]: Being the ignorant one, my initial reaction to that is, "that's sort of a dick move, a lot of people like me expect column names like that to stay the same, why the hell would you change them like that for seemingly no good reason?"
[perldigious]: Or is my irritation/ frustration well founded?
[Corion]: perldigious: That seems to be more the export and likely it's the recipients of that export that like the titles changes
[Corion]: ... "changed"
[Corion]: I usually expect fixed header names, but am sometimes lenient in the order of columns. But changing the report titles often sounds to me as if you are not the sole consument of the export ;)
[shmem]: perldigious: as always - if it ain't broke, don't fix it. Ther must be a very compelling reason for changing column names in a database. Those are rare.
[Corion]: If you have whitespace in the column names in the database, whap the DBAs ;)

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2017-05-25 13:33 GMT
Find Nodes?
    Voting Booth?