Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Data files included in a package

by hardburn (Abbot)
on Aug 28, 2003 at 19:29 UTC ( #287499=note: print w/replies, xml ) Need Help??


in reply to Data files included in a package

I've done something similar for some private modules. Ways I've come up with are:

  • Make the data file into a package of its own. For instance, a config file for My::Foo becomes My::Foo::Config, and My::Foo just uses it.
  • If the data file can't be turned into a package for whatever reason, then use the Makefile.PL to ask the user at install-time where the data files will be located. Then have Makefile.PL generate the config module like above which contains the absolute path to the data.

----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

Note: All code is untested, unless otherwise stated

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://287499]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2020-07-06 03:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?