22.09.2010 09:01, Peter Lobsinger пишет:
  Information about static dependencies is a very important if you want to
>  get a stable software distribution. If one program can not be run without
>  another program you should install both of them. In the form of a high-level
>  language source code the static dependencies a explicitly stated: if we read
>  "use File::Temp;" at the beginning and the program is compiled successfully,
>  then there is a good reason to treat the module File/Temp.pm as a static
>  dependency.

You've chosen a good example to prove that seemingly-static HLL
dependancies are indeed dynamic. As I understand it, Perl 6 modules
are not tied to the filesystem in such an intuitive way. They may be
name-mangled or managed through a registry of some sort. "use
File::Temp" looks up whatever your system considers to be the default
implementation of File::Temp (there may be different versions by
different authors). This will vary by system, and in fact needs to be
a runtime lookup (if your bytecode is going to be able to be passed
around between systems, robust against reconfiguration, etc).

I used "File/Temp.pm" as a simple example of a dependency resolution. In fact all Perl 5 dependencies are extracted as "perl(module name)" and in this form are written to the package metadata. If source code contains "use File::Temp" then the package would automatically require "perl(File::Temp)" (a so called "virtual dependency" in contrast to "file dependency"). In attempt to install that package the package-management system would try to find an other package which provides "perl(File::Temp)". And there may be a number of such packages, one already installed in the target system. This "requires/provides" system has nothing to do with any particular module resolution method.

So, I do not see why "use File::Temp" is not a static dependency. If program can not be run without that module available in the system, then that is a static dependency. The logic is simple.

--
Paul Wolneykien,
  ALT Linux, Ltd.
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev

Reply via email to