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

Re^5: How do I go from procedural to object oriented programming?

by SimonPratt (Friar)
on May 05, 2015 at 14:48 UTC ( [id://1125742]=note: print w/replies, xml ) Need Help??


in reply to Re^4: How do I go from procedural to object oriented programming?
in thread How do I go from procedural to object oriented programming?

Hi, Lady_Aleena. No worries, I've been away for a while anyway.

I had a nosey around your git repository when you first posted the link to it. I thought it was a bit strange that you had gone to so much effort in creating a custom data management interface, however if storage space is that much of a concern to you, then I totally get it :)

__DATA__ effectively tells Perl that everything after that point should be made available through the DATA handle. You get the same effect by having everything below __DATA__ saved in an external file, then manually opening a filehandle called DATA in order to read the content.

In your particular case, your data management interface should be re-worked to do all of the object building for you. So, instead of creating a bunch of hashes, then calling a set of functions to populate the hashes, you should be able to add your data library and create a new library object which would be populated with movie objects, which are all populated with the data contained in your raw files.

Once this is working correctly, it doesn't matter how many scripts need access to this data, they can all simply load your data management library and ask it to give them a library of movies to use.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1125742]
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-16 13:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found