Guest User

Untitled

a guest
Nov 29th, 2012
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. For source-code-only modules with *nix env. as example
  2.  
  3. 1) Default is using newest awailable module (last installed one).
  4.  
  5. Storage subsystem:
  6.  
  7. /usr/lib/perl6/compiler-version/modules/Foo/Bar.pm.0.98.auth_name
  8. /usr/lib/perl6/compiler-version/modules/Foo/Bar.pm.0.98.another_name
  9. /usr/lib/perl6/compiler-version/modules/Foo/Bar/MOP.pm.0.98.auth_name
  10. /usr/lib/perl6/compiler-version/modules/Foo/Bar/MOP.pm.0.99.auth_name
  11.  
  12. Links to newest modules (or copy of newest modules), updated by package manager, in:
  13.  
  14. /usr/lib/perl6/compiler-version/lib/Foo/Bar.pm # ver. 0.98, auth which was last instaled
  15. /usr/lib/perl6/compiler-version/lib/Foo/Bar/MOP.pm # ver. 0.99
  16.  
  17. So 'use Foo::Bar;' looks in '/usr/lib/perl6/compiler-version/lib' for newest modules.
  18. Means MOP v.0.99 is used by default.
  19.  
  20. Then 'use Foo::Bar::MOP:ver.a.bc' must be used to get required version. This overrides if newer version
  21. was loaded.
  22.  
  23. Loader subsystem:
  24.  
  25. If things must be complicated then middle-ware app can be used for manage set of modules and used as:
  26.  
  27. perl6 -I manifest.mft App.pl
  28.  
  29. or
  30.  
  31. use Loader::Versions('my_set');
  32.  
  33.  
  34. Modules sets can be modified/edited. Sets can be a way to 'deploy' modules into production environment.
  35.  
  36.  
  37.  
  38. Precompilation:
  39.  
  40. Resolving right module is done by searching for right Code::Source.pm6 and then cache can be checked.
  41.  
  42. Middle-ware can also define 'sets' of modules, precompile them, allow to switch to other set, etc.
  43.  
  44.  
  45. 'Auth' influence not fully used here. 'Auth' means source probably. Can be resolved in middle-ware sets.
  46.  
  47.  
  48.  
  49. Any modifications hereby are allowed.
Advertisement
Add Comment
Please, Sign In to add comment