[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

RE: [MacPerl] Howto import modules into runtimes?



Ė 17:58 +0200 22/04/97, Axel Rose nous disait:

> What do I do with dependencies? E.g. the module "File:Copy" is using
> "Carp", etc.
> I would need to find out all needed modules in order to incorporate them
> as TEXT resources ...
>

why don't you install all the modules you need in a central location like
the preference folder of your user's machine. You could use an installer
app to do the job if you have several users.

your script will find its way to the modules folder if you use 'findfolder.pl':
(You would still have to paste findfolder in the resource fork)

	#!perl

	require "FindFolder.pl";

	$prefs = MacPerl::FindFolder('P');
	# P returns 'HD Interne 700:Dossier Syst¸me:Prˇfˇrences:'
	# on my machine

	$libpath = $prefs."YourAppPrefFolder";
	# or whatever you choose
	# make sure the user does not rename "YourAppPrefFolder"

	use lib $libpath;
	# or unshift(@INC,$libpath);

	use YourModule;


I haven't tested this, though... Let me know.


Stef


        	_____S__t__ˇ__p__h__a__n__e_____J__o__s__e_____

		         mailto:jose.stephane@uqam.ca
	              http://www.er.uqam.ca/nobel/m206474/


                  - Hiroshima 45, Tchernobyl 86, Windows 95 -



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch