Created attachment 330266 [details] emerge --info $ qlist app-admin/collectd-5.1.1 | grep perl /usr/lib/perl5/Collectd.pm /usr/lib/perl5/Collectd/Unixsock.pm /usr/lib/perl5/Collectd/Plugins/OpenVZ.pm /usr/lib/perl5/x86_64-linux-thread-multi/auto/Collectd/.packlist /usr/share/man/man5/collectd-perl.5.bz2
and what would the correct directory be?
Something listed by: $ perl -le 'print foreach @INC' Looks like others are in /usr/lib64/perl5/vendor_perl/5.12.4/ on mine.
From reading your emerge --info, COLLECTD_PLUGINS section doesn't seem to contain perl unixsock. Is this perhaps stray files for whatever reason? Perhaps I'm missing something. I don't get any perl plugin (openvz, monitorus) installed when building with USE="perl". Regarding OpenVZ, I think you have to pass --with-perl-bindings=openvz for it to build. We should add a USE-flag for that.
(oh, and one more perl plugin, the unixsock access library)
I can reproduce this; was using the 5.2.0 ebuild earlier but just tried the in-tree 5.1.1. Will have a look - but I suspect that default behavior regarding --with-perl-bindings is different.
Ok, so. I can't fully wrap my head around this. A couple of notes: - we enable the bindings if USE=perl is around. This behaviour is slightly different between 5.1.1 and 5.2.0 (not really relevant) - running make install from the bindings/buildperl directory at least for me puts it "where it should be" - the Makefile has correct paths in its variables Not sure, but since the install is recursive, it might inherit something from somewhere. I'm not really well versed in how that ext::makefile works in perl (Makefile.pl -> Makefile conversion). I'll ask someone from the perl herd on IRC and see if I can go further.
Installed correctly for me by applying patch from: https://github.com/tokkee/collectd/commit/25fd24689c4c35409f68daf5587a67a247fc1446 and modifying src_configure() to: myconf+=" $(use_with perl perl-bindings=INSTALLDIRS=vendor)" Leaving out INSTALLDIRS=vendor puts things in site_perl, but this looks wrong. Informed by: http://packages.debian.org/wheezy/collectd http://search.cpan.org/~mschwern/ExtUtils-MakeMaker-6.62/lib/ExtUtils/MakeMaker.pm#make_install
Created attachment 331240 [details] collectd-5.1.1-r1.ebuild Here's an updated ebuild (and patch) with above changes implemented. I can't really speak for whether they should be installed in vendor_perl or perhaps site_perl, but we at least have similar functionality as other ebuilds.
Created attachment 331242 [details, diff] collectd-5.1.1-perl-prefix.patch
+*collectd-5.1.1-r1 (03 Dec 2012) + + 03 Dec 2012; Markos Chandras <hwoarang@gentoo.org> +collectd-5.1.1-r1.ebuild, + +files/collectd-5.1.1-perl-prefix.patch: + Revbump to fix installation path for perl module. Bug #444360 thanks to Johan + Bergström <bugs@bergstroem.nu> +