http://www.perlmonks.org?node_id=583437


in reply to Modules dealing with data files

If I were doing something like this, I'd try and make my module try a number of tricks rather than only one.

E.G.

  1. Look for recent data file from CPAN ala brian_d_foy's response above
  2. Failing that, try previous known-good file names
  3. Failing that, try guessing at file names based on any patterns you've recognised
  4. Failing that, ask the user
  5. ...etc...

This way, you have the known-good option first, but you also have a few fallbacks so users have some recourse if they're cut off from CPAN or you die in a car crash and can't update the file, or whatever.

--Pileofrogs