Hi,

This mail has been brought to my attention.

> While trying to package some useful Perl modules I found out that it's 
> absolutely unclear how filesystem layout should look like.
> Quick look at /usr/perl revealed that few possibilities exists:

That's perl way of doing things. It's skimmed in

$ perldoc ExtUtils::MakeMaker
( beware, sun ships perldoc in /usr/perl5/5.8.4/bin/perldoc , which is
sort of interesting concept to me <g> )

and look for INSTALLDIRS

You will see that there are three possibilities
a) perl (also known as 'core')
b) site
c) vendor

Perl variable @INC says where the modules will be looked:

$ perl -e 'print join "\n", @INC'
/store/install/perl/lib/site_perl               <- this is my own addition  
(.bashrc contains 'export PERLLIB=/store/install/perl/lib/site_perl')
/usr/perl5/5.8.4/lib/i86pc-solaris-64int        <-- perl (core)
/usr/perl5/5.8.4/lib                              \
/usr/perl5/site_perl/5.8.4/i86pc-solaris-64int  <---
/usr/perl5/site_perl/5.8.4                       \  site
/usr/perl5/site_perl                              \-
/usr/perl5/vendor_perl/5.8.4/i86pc-solaris-64int <---
/usr/perl5/vendor_perl/5.8.4                      \ vendor
/usr/perl5/vendor_perl                             \-


> 2. 5.8.4/lib/i86pc-solaris-64int hierarchy
> 3. site_perl/5.8.4/i86pc-solaris-64int hierarchy
> 4. vendor_perl/5.8.4/i86pc-solaris-64int hierarchy

Not exactly, it's actually  5.8.4/lib, site_perl/5.8.4 and
vendor_perl/5.8.4. (if you would have 5.8.4 only - no lib, the modules
would get mixed up with 5.8.4/bin and 5.8.4/man and that would not be
nice)


> so the questions are:
> 1. what the point of i86pc-solaris-64int sub-hier in 5.8.4/lib (and 
> site_perl/5.8.4 and vendor_perl/5.8.4)? First guess was `dependency on 
> some binary stuff', but that's seems to be wrong.

You are correct, the i86pc-solaris-64int is platform dependent
directory.


> 2. what the difference between $VERSION/lib, site_per/$VERSION (note: no 
> lib/) and vendor_perl/$VERSION (once again no lib/)?

Original reason to create 'perl(core)' 'site' and 'vendor' was to
separate directories for modules shipped with perl itself, shipped by
your distribution (vendor) and compiled on your own box (site).

So modules shipped with Solaris should be in the vendor directory.
( Oooh, why is SUNWimagick shipping
/usr/perl5/site_perl/5.8.4/i86pc-solaris-64int/Image/Magick.pm ?!? )
Correct way to do that (again, check MakeMaker documentation)

perl Makefile.PL INSTALLDIRS=vendor

This should read perl site Config.pm and populate the Makefile with
paths to /usr/perl5/vendor_perl/5.8.4

In reality, it's a bit more complicated though, but if the module is
written correctly, it will work :)

Good luck !

-- 
        Vlad

Attachment: pgpQ1KumVu6XH.pgp
Description: PGP signature

_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to