Tim Landscheidt wrote:
> Part of the application is a rather huge SQLite database
> that gets generated from text data before installation. In a
so every time there is a new "text data" you want to ship a new package
to install, right?
> standard FHS environment, it should probably end up below
> /usr/share/$WEBAPP. Module::Build does not seem to provide
> an option to install data there, so:
Module::Build does support this. you are free to install any file/folder
anywhere...
my $builder = Module::Build->new(
...
'db_files' => {
'db/sqlite.db' => 'db/sqlite.db'
},
'install_path' => {
'db' => "/usr/share/$WEBAPP"
}
);
$builder->add_build_element('db');
assuming that db/sqlite.db is the sqlite file that you want to install
to /usr/share/$WEBAPP
> Where do CPAN modules usually store read-only data? Does
> someone know of a module that I could use for reference?
> Also I'm interested in modules using Module::Build with such
> a generation/transformation step in its Build.PL.
you can add any additional (non Module::Build) code in Build.PL. depends
what is enough for you. you can add few lines there that will check if
db/sqlite.db exists and if not generate it. or you can subclass
Module::Build and make your transformation during ACTION_build.
j