Something so simple has melted my brain this evening. While working on Mango, I've setup the code so things like TT templates are stored in the perl 'share' directory for Mango using M::I::Share and get those files later view File::ShareDir.
I just put a fresh install of Ubuntu with perl 5.8.8 on my laptop and installed Mango, but the app couldn't find the template files. After some digging, I'm even more confused than ever.
# Put everything inside
When I ran make install, the shared files were installed to
When I call ShareDir::dist_dir, I get
When I call ShareDir::module_dir, I get
I'm pretty sure at this point that where the files are installed by M::I::Share is correct.
The pod for dist_dir and module_dir both say the same thing:
The dist_dir function takes a single parameter of the name of an installed (CPAN or otherwise) distribution, and locates the shared data directory created at install time for it.
Now, I could just use module_dir instead of dist_dir in my code. The question is, will that always work? Or do I just have screwy expectations that the pod doesn't clarify?