Description of problem: Currently Publican has hard coded paths for share content, /usr/share/publican on Linux, these path should be sourced from the local perl install. Version-Release number of selected component (if applicable): 2.5 Additional info: Hard coded path makes porting to other platforms harder. http://search.cpan.org/~jkutej/Module-Build-SysPath-0.13/ should allow this behaviour. http://search.cpan.org/~jkutej/Sys-Path-0.10/ has an example of using the above.
Proposed solution: Add calls to config_data in Build.PL to create a Publican::ConfigData at build time. See http://search.cpan.org/~leont/Module-Build-0.4003/lib/Module/Build/Authoring.pod#SAVING_CONFIGURATION_INFORMATION e.g. In Build.PL $builder->config_data('cfg_path', $builder->install_path('etc')); Then in code: use Publican::ConfigData; my $cfg_path = Publican::ConfigData->config('cfg_path'); open($FOO, "<", "$cfg_path/publican-website.cfg");
I've committed a first shot at fixing this to a new branch. git checkout bz661946 Seems to work well and should be fairly portable. Updated README with an example of how to override the paths on the command line during building.
Did you expect me to review or have a try ? I'm fairly busy right now so I was not planning to do it... but if you believe that it's needed, I will try to find a slot for this.
(In reply to comment #3) > Did you expect me to review or have a try ? I'm fairly busy right now so I > was not planning to do it... but if you believe that it's needed, I will try > to find a slot for this. The comment was mostly for me to remember what I'd done :) But if you have an itch to scratch then that's just free beer :D
This fix has been committed to the devel branch for inclusion in Publican 3.1.
Hi Jeff, I remember that QE won't test this bug, and we have add this bug in "Features not to be tested" in test plan, so please help to verify this bug and change the bug status, thanks very much