Perl: CPAN Vs. Ports for FreeBSD

keen-links

New member
Joined
Apr 23, 2005
Messages
2
Looking for experienced advice. I am new to direct admin. It is my understanding that the perl used in a FreeBSD/DirectAdmin machine is installed from a FreeBSD port/package, while the mod_perl is compiled by the direct admin install and not a port/package from FreeBSD. My question is this: For other perl modules, is it better to use the CPAN module for installing, or to use the FreeBSD ports? With ports, my fear would be that a certain port's dependencies would force a perl/mod_perl even mysql upgrade that would mess up the direct admin install. My gut thought is that once mod_perl has been compiled outside of the ports mechanism, then one should just keep using manual download or CPAN methods. Any experienced thoughts?
 
Personally I would do it with CPAN since perl is already setup for that by default. A simple command and your done and you don't have to mess with the ports system, trying to keep it uptodate, compatible etc.
 
I tend to install perl modules from ports if there is a choice, makes admining so much easier when it comes to upgrading perl etc. The only thing I think that will have a dependency for it is apache and if you use the apache from custompache src dir then the ports shouldnt need to call for mod_perl.
 
One for CPAN, one for ports. While still pondering this issue, I thought I would run my own tests. I set up a FreeBSD system similar to my host. I used:

Perl 5.6.1 from the ports,
Apache 1.3.31 from source,
Mod_perl 1.27 from source.

These are the same versions as my host. I do not have a direct admin package, but since it uses Apache and Mod_perl from source I felt it was similar. The first thing after this install, I installed libapreq from the ports (very common module used by mod_perl) and the result was that it upgraded perl to 5.8 and installed Apache 1.3.33 and mod_perl 1.29 from the ports system. Since FreeBSD Apache and the source Apache had different layouts, I now had 2 Apaches with different versions of the Mod_perl DSO, but the Mod_perl modules with the perl libpath were from 1.29 only (incompatible with the source Apache install). This sounds like a mess. If the only thing that happened was the Perl upgrade, then one could just re-run the mod_perl build script under the customapache directory to recompile it. But since the port system installed the other items, using ports could possible break the system.

My conclusion is, if you compile any main program from source (direct admin), then stay with the source approach and use CPAN. If you build a FreeBSD system only, go with ports.

Any other opinions?
 
That's precisely why I didn't use ports. I used the package system for everything else and kept a close eye on dependencies (what would be installed etc).
There is a workaround so that ports will not install the additional software, but personally that it more trouble than is worth.
 
Back
Top