Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Time to upgrade tp OO Perl?

by starbolin (Hermit)
on Apr 28, 2008 at 22:46 UTC ( [id://683385]=note: print w/replies, xml ) Need Help??


in reply to Time to upgrade tp OO Perl?

cosmicperl writes:

Now I'm thinking if I split it up and keep using this method things will get messy.
This is anything but OO for the sake of OO. Also you would be moving from a global $dbh to a closure. Consensus is this is a good thing. Right now it would be difficult to test your code in pieces as $dbh needs to be created first and is global among all the subroutines. With OO each member function receives a reference to the object it is going to work on so testing individual objects becomes trivial.

s/objects/member functions/


s//----->\t/;$~="JAPH";s//\r<$~~/;{s|~$~-|-~$~|||s |-$~~|$~~-|||s,<$~~,<~$~,,s,~$~>,$~~>,, $|=1,select$,,$,,$,,1e-1;print;redo}

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-26 04:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found