develooper Front page | perl.perl5.porters | Postings from June 2009

Re: [perl #42329] Carp::croak() replace user error message by own

Thread Previous | Thread Next
From:
Jim Cromie
Date:
June 29, 2009 05:53
Subject:
Re: [perl #42329] Carp::croak() replace user error message by own
Message ID:
cfe85dfa0906290553w118c097fxf1a869fb9495c951@mail.gmail.com
On Mon, Jun 29, 2009 at 8:46 AM, Nicholas Clark<nick@ccl4.org> wrote:
> On Mon, Jun 29, 2009 at 08:31:06AM -0400, Jim Cromie wrote:
>> >> shouldn't affect performance. Moreover, if you wanna speedup Carp loading,
>> >> then there a lot of other techniques - like moving POD to the bottom of
>> >> file under __END__. Also consider just moving Carp::Heavy content to Carp,
>> >> this shouldn't increase Carp module load time by any noticeable value and
>> >> also allow to do some code cleanup.
>> >
>> > I tend to concur. Those days we have more CPU and memory resources, so
>> > a cleanup to merge Carp::Heavy in Carp is totally feasible.
>> >
>>
>>
>> By extension, this also applies to Config ?
>
> Rafael may well disagree with me, but I don't think it should apply to Config.
>
> My reasoning for splitting Config.pm apart was that a monolithic Config.pm
> loads (at least) 32K of data that is rarely used, and cloned to each and every
> thread, if you're using threads. I've not measured Carp::Heavy, but I suspect
> that it's less than 32K, and as it's mostly ops, there's not going to be
> anywhere near as much thread overhead.
>
> Config doesn't fail catastrophically if it fails to load Config_heavy.pl,
> whereas as Alex Efros notes, Carp failing will eat the error message.
>
> Additionally, the code needed to split Carp::Heavy out from Carp looks
> complex, and I suspect is fragile, whereas the AUTOLOAD subroutine in
> Config.pm is in one place, simple and conventional. (As conventional as
> anything using AutoLoader)
>
> Nicholas Clark
>

ack. very different in the details and tradeoffs.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About