Re^2: Where to put data that goes with a module?by Lady_Aleena (Priest)
|on Aug 26, 2020 at 18:28 UTC ( #11121111=note: print w/replies, xml )||Need Help??|
Hi. I know it has been almost two months since I asked this, but I got frustrated then, so decided to let this sit for a while. So now I have calmed down a bit, I can dig in.
So, today I decided to give File::ShareDir a go on the command line, and I got the answer I was looking for initially. The main directory for external files a module needs is lib/auto. So now I know where to put the external data files and can use File::ShareDir to hopefully get them. I have not tried this yet but will shortly. Here is what I think the top of my module will look like, in this case I am using one of my favorites, Random::Color.
Also, I am assuming when I go to package Random::Color the file list inside the package will be something like this.
Am I on the right track here? I got the base of this structure from Discipulus's tutorial.
As an aside, I finally started using git because of that tutorial. How to use git was explained very well there. I am so very grateful for it!
Update: I tried it, it works as expected, I'm happy! Thank you for the recommendation.
My OS is Debian 10 (Buster); my perl versions are 5.28.1 local and 5.16.3 or 5.30.0 on web host depending on the shebang.
No matter how hysterical I get, my problems are not time sensitive. So, relax, have a cookie, and a very nice day!
In Section Seekers of Perl Wisdom