in reply to Where to put the bits and pieces - Installing a complex CPAN dist

I'm only a humble user of Debian and Perl so please take my suggestions a if I know very little

Put the demos and demo conf in a pod. Then you could have Your::Module::Demo and Your::Module::Demo::Conf, assuming you have Your::Module of course.

You would also have Your::Module::Conf to discuss the default configuration and Your::Module would have to indicate these other pods exist.

The demos and their confs as distinct files could also end up in a sub dir of /usr/share/doc/libyourmodule-perl/. As could any info about the default conf. That's where I might expect to look for them anyway.

As for the shared stuff there are share directories used by many perl modules e.g. /usr/share/perl/5.8.8, /usr/local/share/perl/5.8.8 and /usr/share/perl5 with rules as to what goes where.

Then you could consider a web site to show the documentation again

Best I can offer I'm afraid - if I am understanding correctly what you are asking of course.

  • Comment on Re: Where to put the bits and pieces - Installing a complex CPAN dist

Replies are listed 'Best First'.
Re^2: Where to put the bits and pieces - Installing a complex CPAN dist
by Hercynium (Hermit) on Sep 19, 2008 at 16:11 UTC
    Thank you for your input - Debian tends to be my "gold standard" for correct packaging, and it seems that most of the Perl community agrees.

    To try to clarify, the demo scripts are just that - scripts, and they use config files that the modules will look for on the system (the search path is *fully* configurable). Each script has it's own config file.

    In the case of this distro, applications written using the modules will need to load config files and so I think the appropriate location is in /etc/$distname or /usr/local/etc/$distname. System defaults (like the search-path and various default behaviors) are stored in a module generated by Module::Build, but those can be overridden by any application's config.

    I'm wondering if I should put the demo configs under an etc directory as well, or should they be sequestered under a /usr/share sort of place. Perhaps I should put them under /usr/share and install into /usr/bin a script that the user could run later that copies the demo configs and scripts from there to /etc?

    After packaging it correctly, my goal for this distro is to make it as *easy* as possible for people to use and try out. It's been used in production for years now, but the author always custom-installed it, usually placing things wherever seemed good for that particular instance. Now we both want to see this software with a broader user-base, and my opinion is that a distro *must* install properly, right from CPAN, or 99.9% of users will give up and never look back. "Properly" includes putting things in places that are accessible and expected by the users and won't annoy sysadmins who run a tight ship (ARRRRRR!)

      It's always difficult to really be sure but I think the standard form is to put demo scripts and their config files in /usr/share/doc/<package-name>/demo and /usr/share/doc/<package-name>/demo/conf directories. I think tucked away with the default config in /etc would be the wrong place - not even exim4, spamassassin or clamav do that.

      I think that /etc or /usr/local/etc is the right place for an active config or set of configs for an installed system. (My /usr/local/etc happens to be empty on two systems.)

      Pod could always point out the existence of the /usr/share/doc/<package-name>/demo directories and even discuss their contents as well as that of the default install

      I think that is fairly general Linux behaviour - at least what I have seen of Debian, SuSE, Mandriva and Ubuntu - and so not entirely limited to Debian. The FHS says /usr/local/etc is for host specific configuration files for local binaries. I don't know if your application falls into that category.

      Nightmare with all the different possibilities, though -- I can't imagine where things go in Windows... or a Mac .

      Good luck