Jaap Karssenberg wrote:
What is the best way to package glade xml files with my perl script ? Should I (A) supply them as data files to be installed in */share/myapp/ , should I (B) put them all in the __DATA__ part of the script or should I (C) package them into separate perl modules ? ( option (D) of course being 'none of the above' ) Seems to me that using data files is the clean option, but I don't believe the default install scheme for perl apps (useing ExtUtils::MakeMaker) has a data dir and I want the app to be portable, but with the other two options I'm still stuck with the images so it doesn't fix everything. How is this done usually ?
This is a hard question I have thought about a lot before; I guess the cleanest solution is to have some sort of MakeMaker thing going on that will automatically create a directory for you in your system's (assuming Unix) datadir location (/usr/share/ on linux)... I like the idea of the __DATA__ approach though, especally if you just have one glade file. (although there is that multi-data-section module.. can't remember what it's called right now though)
autoconf has --prefix and --datadir which would be helpful, but the autotools would be overkill for a simple perl app (like my xalbumlist.. one script, one glade file)
Note that I am not concerned about Windows either :) however, the __DATA__ method would be the most portable in this instance.
James