Installing extra data files with a Makefile.PL?

E

Erik Wasser

Hi Usenet,

I have written a module with some additional files. These additional
files are some kind of text database for running the module. My question
is: how can I install these additional files with the 'Makefile.PL'? How
can I bring Makefile.PL to copy some text files to '/usr/share/foobar'?

I read the man pages of ExtUtils::MakeMaker,
ExtUtils::MakeMaker::Tutorial, perlmodstyle and perlnewmod but there was
nothing of interests for this problem (or I don't have seen them, links
are welcome).

How does others modules solve this problem of data files? I know the way
of using Data::Dumper to make a perl dump of data but I would prefer the
plain text files because so I can edit the data in a very easy way.

Does anyone know a modul with some extra-data?
 
R

Randy Kobes

Erik said:
Hi Usenet,

I have written a module with some additional files. These additional
files are some kind of text database for running the module. My question
is: how can I install these additional files with the 'Makefile.PL'? How
can I bring Makefile.PL to copy some text files to '/usr/share/foobar'?

One way is to just set up a dialogue within Makefile.PL
(ExtUtils::MakeMaker has a prompt subroutine) to ask the
user where they want to install the data file, and then
just copy it over. Alternatively, you can add the relevant
command to the "install" target (see the section on overriding
MakeMaker methods in the ExtUtils::MakeMaker docs) to have
the file copied at the "make install" stage.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top