Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: I present to you... Horrible code!

by dragonchild (Archbishop)
on Jan 08, 2005 at 17:33 UTC ( #420551=note: print w/ replies, xml ) Need Help??


in reply to Re: I present to you... Horrible code!
in thread I present to you... Horrible code!

That said, this function, in its original form, is completely useless, because it is executing a SELECT request from a locally scoped statement handler, and its result would be simply lost.

Oh, there's more fun than that, my friend! There are some databases where you can set up a view in such a way that a SELECT against it actually makes changes to stuff. In Oracle 9, you can actually have it do literally anything, including executing Perl code.

Being right, does not endow the right to be rude; politeness costs nothing.
Being unknowing, is not the same as being stupid.
Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.


Comment on Re^2: I present to you... Horrible code!
Re^3: I present to you... Horrible code!
by hardburn (Abbot) on Jan 10, 2005 at 14:32 UTC

    That's some messy programming-by-side-effect there. Sure, calling an external database is already a side-effect, but it's the sort you pretty much have to live with. If the posted code is using such a view, I wouldn't consider it an improvement.

    "There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://420551]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (10)
As of 2014-10-22 16:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (119 votes), past polls