In your case I'd probably just hardcode a path, like /usr/share/yourmodule/ and put the data file(s) there. Unless they are pretty small, in which case a __DATA__ section would be even easier. Then change your module to read them when it needs them.
That's the "how" if you don't follow the File::ShareDir route -- though personally I think that even simples modules should have a proper build/install system (via Module::Install or Module::Build), because it's easy to set up and easy to use.
Occasionally certain values will need to be changed, but this would be on an application-wide basis, not on a user-by-user basis.
This indicates that it's not a one-off script, but something that is developed and/or maintained over a longer period of time. I'd definitively go the Module::Install/Module::Build route for that, and use File::ShareDir to locate the data files. But your mileage my vary, of course.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
Outside of code tags, you may need to use entities for some characters:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||