Hi! So, to put my SDL-base Spaceinvaders game [0] on CPAN I need to install some stuff (images) alongside my dist. Previously I used several different homegrown techniques for this, which work. But I'd rather use the sort of common File::ShareDir instead of rolling my own. Unfortunatly, Module::Build does not support actually installing stuff that File::ShareDir can later find out of the box.
I could now (again) fuzz around add_build_element, install_path etc, but I'd rather put all of this into a reusable module, i.e. something like File::Share::Install or Module::Install::Share, only for Module::Build. First question: Does this exist already? Or is there some easy way using Module::Build to say "take all the stuff in this dir and install it to where File::ShareDir would look for it"? Second question: Instead of writing a subclass of Module::Build and put that on CPAN I'd rather implement this as a mixin (i.e. a distribution that exports some methods that then can be used by a standard Module::Build instance). What do you think about that? For the API, I'd like to have something like $builder->install_share(@list_of_dirs); This would go through all the dirs, add the files in these dirs to the configuration ('share_files'), add a correct install_path, call add_build_elements, maybe add those files to no_index, .. Any more feedback/ideas? 0: http://github.com/domm/Game-PerlInvaders -- #!/usr/bin/perl http://domm.plix.at for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}