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

Re: [MacPerl] Howto import modules ...



At 4.42 97/5/7, Georges Martin wrote:
>Is there a similar method to encapsulate the 'require'd .pl files used in
>old scripts ?
>
>I tried to manually copied these files into TEXT resources and naming them
>accordingly but it doesn't work... as I suspected :-)

Require'ing files is easier, usually.  Most of these require'd files just
consist of a bunch of subroutines.   It depends on the file, but most of
the time you should be able to simply copy the file and paste it into the
bottom of your script.  Remove the "1;" at the end of the file.  If there
is anything in the file OUTSIDE a subroutine, find a way to integrate it
into your script or put it into its own subroutine that you call in place
of the "require" line.

This might not work all the time, but it should help.

--
Chris Nandor                 pudge@pobox.com                 http://pudge.net/
%PGPKey=('B76E72AD',[1024,'08 24 09 0B CE 73 CA 10  1F F7 7F 13 81 80 B6 B6'])
#=============================================================================
Some people think George is weird, because he has sideburns behind his ears.
I think George is weird, because he has false teeth.  With braces on them.
                --Steven Wright
#=============================================================================



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