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.
M::I::Share says:
# Put everything inside ./share/ into the distribution 'auto' path
When I ran make install, the shared files were installed to /usr/local/share/perl/5.8.8/auto/Mango. Mango modules files are also installed to /usr/local/share/perl/5.8.8/Mango
When I call ShareDir::dist_dir, I get /usr/local/lib/perl/5.8.8/auto/Mango. Nothing of Mango is installed there.
When I call ShareDir::module_dir, I get /usr/local/share/perl/5.8.8/auto/Mango.
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.