On Sun, Jun 14, 2015 at 8:32 AM, Roderich Schupp <roderich.sch...@gmail.com>
wrote:

> On Thu, Jun 11, 2015 at 8:09 PM, Philip Gwyn <li...@artware.qc.ca> wrote:
> > To me, all libraries should allow the caller to specify where to find
> data
> > files.
>
> That's a nightmare for admins and packagers...
>

Looking at MIME::Types, I see the following in _read_db

    my $db              = $ENV{PERL_MIME_TYPE_DB}
      || $args->{db_file}
      || File::Spec->catfile(dirname(__FILE__), 'types.db');

So, MIME::Types already provides a way for the caller to specify where to
find data.

If there is a standard location in the package, relative to the packaged
application, for data files, then I would say there's no need to make a
change to PAR::Packer

If I were going to make a change to PAR::Packer, I would be inclined to
provide the packaged application with $ENV{PP_PERL_MIME_TYPE_DB} set to the
packaged location of types.db so that the application could then decide
where to tell the module to look for the file.

Reply via email to