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.