Re: Adding to @INC
[email protected] (Sherm Pendley)
| Newsgroups | perl.macosx |
|---|---|
| Message-ID | <[email protected]> |
On Jan 8, 2009, at 12:27 PM, Sam Seaver wrote: > On Thu, Jan 8, 2009 at 11:24 AM, Sherm Pendley <[email protected] > > wrote: >> On Jan 7, 2009, at 10:36 PM, Vic Norton wrote: >> >>> Another curiosity. I just checked out the Perl5.8.8 files in /usr/ >>> bin and >>> /opt/local/bin. The /usr/bin one came with Leopard, which I bought >>> from >>> Apple a week or so ago. It was created on Dec 7, 2007, and it >>> weighs 48 KB. >>> The MacPorts perl was created on Sep 5, 2008, and weighs 1.1 MB. >>> Why, I >>> wonder, should one Perl5.8.8 be 25 times as big as another? >> >> MacPorts' perl is probably built with a static libperl. Apple's is >> built >> with a dynamic libperl. > > Would this mean that one version is 'faster' than the other? Apple has build-time information from building the entire OS that allows them to use prebinding on their libperl. That made a big difference on pre-Tiger releases, where non-prebound dynamic libraries carried a hefty performance penalty. Since most of us don't have the info that Apple has, Perl defaults to building a static libperl on Darwin. Apple overrides the default with "-Duseshrplib" for their build. In Tiger and newer, the dynamic loader is much improved and the reliance on prebinding eliminated. But Perl still defaults to building a static libperl, basically out of inertia. sherm--