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

RE: [MacPerl] Howto import modules into runtimes?



Axel Rose <rose@ummagumma.sj.com> wrote:
>Tim Endres wrote:
>>>I've heard about pasting modules into Perl applications as TEXT
>>>resource but could not find any documentation ...
>>
>>My understanding is that you name a TEXT resource the same name as
>>the 'use' refers to, and MacPerl will use this resource for the module code.
>>Then, I believe, you just paste the module's code in the TEXT resource.
>
>This is exactly what I'm looking for!!
>
>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 ...
>
>
>Any helpful ideas?
>Can I check the modules a running MacPerl program is using?
>
>
>Hopefully not stressing everybody's patience too much
>
>
>Axel
>
>---
>Axel Rose
>SPRINGER & JACOBY
>Werbung GmbH
>rose@ sj.com
>

Hello,

      I don't know a way to do this directly - however, you could write a Perl
program to statically analyse your "use" chain. This would be a recursive
routine such that when a "use" statement is encountered, that "use'd" module
is inspected, for any "use's" within. This process is carried out until a
module
which has no dependencies is encountered, then the dependency tree is climbed.
A list would then be constructed. This technique is similar conceptually
to traversing a hierarchical directory structure (and dropping down a level
when a sub-directory is encountered).

      If this isn't clear please mail me. If anyone does know a better way
to check the modules a running MacPerl program is using, please advise.

Bob

________________________________________________________________
          Bob Wilkinson, Perl Programmer, Pindar plc
Tel: +44 (0)1904 613040    Email: B.Wilkinson@pindar.co.uk
Fax: +44 (0)1904 613110    URL: http://www.connection.co.uk/bob
________________________________________________________________
  I don't speak for my employer - er, they made me say that..
________________________________________________________________



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