Miguel has asked for the wisdom of the Perl Monks concerning the following question:
Esteemed monks,
This is a recurrent question (Including text files in Modules) but I still don't understand how do I include files in directories and subdirectories inside a package. I've been trying all the possibilities posted in the above thread (and some others) but with no success.
Some files contain specifications which cannot be modified and others contain perl data structures (extracted from those files).
This is a recurrent question (Including text files in Modules) but I still don't understand how do I include files in directories and subdirectories inside a package. I've been trying all the possibilities posted in the above thread (and some others) but with no success.
The problem is:
I have a file system structure similiar to this:
There are 1000s of files (TXT files) in these directories.My/Module | +------- Files | +----- FilesOfTypeA | | | +----File1 | +----File2 | +----File3 | +----FileN | +----- FilesOfTypeB | | | +----File1 | +----File2 | +----File3 | +----FileN | +----- FilesOfTypeN
Some files contain specifications which cannot be modified and others contain perl data structures (extracted from those files).
Now, how do I include these files into the package? I've been trying with File::Spec, Cwd, File::Basename but with no success: 'make test' works but then, when I 'use My::Module', it complains about not finding the files.
Sorry for not posting my code, but I don't have it at hand.
Thank you for your time,
Miguel
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How to include a lot of files in a module?
by sgifford (Prior) on Jul 14, 2006 at 15:36 UTC | |
by Miguel (Friar) on Jul 15, 2006 at 10:36 UTC | |
Re: How to include a lot of files in a module?
by shmem (Chancellor) on Jul 14, 2006 at 14:51 UTC | |
Re: How to include a lot of files in a module?
by jhourcle (Prior) on Jul 14, 2006 at 14:54 UTC | |
Re: How to include a lot of files in a module?
by xdg (Monsignor) on Jul 14, 2006 at 15:31 UTC | |
Re: How to include a lot of files in a module?
by stonecolddevin (Parson) on Jul 16, 2006 at 00:47 UTC |
Back to
Seekers of Perl Wisdom