Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Data files included in a package

by hardburn (Abbot)
on Aug 28, 2003 at 19:29 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://287499]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-04-25 22:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found