Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Newbie OO module-structure question

by Anonymous Monk
on May 01, 2019 at 11:56 UTC ( [id://1233226]=note: print w/replies, xml ) Need Help??


in reply to Re: Newbie OO module-structure question
in thread Newbie OO module-structure question

OP here. This, and BillKSmith's comment below, certainly makes sense, but in both cases, I'm not sure what the right approach would then be. That is, it seems to me that it's not unreasonable to have core code (as above, e.g. config, database connections, logging, etc.) in one central place, and other things in other places. But if I'm treating OO things as nouns, refactoring this code along these lines won't solve my (perceived) problem, which is that the code is really large.

That is, if this program does deal with files (not exactly the case, but it works for this purpose), having a class representing files, and then methods for archive, delete, convert, etc., will still leave me a five-thousand line class with five methods in it, instead of a five-thousand line program with five sections.

Am I worrying too much about the size of the monolithic block? Would five methods of this sort (which will, of course, have a number of accessory or utility sub-methods) be cleaner? It seems to me that it wouldn't, but....

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2024-04-25 11:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found