Re: Carp vs Carp::Heavy was: Re: [PATCH] Put Carp into the Tarpit (No Carp #2 - Archive::Tar)

2005-07-01 Thread Michael G Schwern
On Fri, Jul 01, 2005 at 11:39:18PM +0100, Dave Mitchell wrote: > I disagree that the POD should be at the top because > > * it's less efficient: > > Perl will stop reading a src file when it encounters an __END__; on my FC3 > system, perl does a single read() syscall of the first 4K of the file; >

Re: Carp vs Carp::Heavy was: Re: [PATCH] Put Carp into the Tarpit (No Carp #2 - Archive::Tar)

2005-07-01 Thread Dave Mitchell
On Fri, Jul 01, 2005 at 03:00:10PM -0700, Michael G Schwern wrote: > On Fri, Jul 01, 2005 at 04:05:21PM +0100, Dave Mitchell wrote: > > On Tue, Jun 28, 2005 at 11:24:59AM -0700, Michael G Schwern wrote: > > > Its the principle of the thing. Also, not initializing $Verbose and > > > $MaxEvalLen see

Re: Carp vs Carp::Heavy was: Re: [PATCH] Put Carp into the Tarpit (No Carp #2 - Archive::Tar)

2005-07-01 Thread Michael G Schwern
On Fri, Jul 01, 2005 at 04:05:21PM +0100, Dave Mitchell wrote: > On Tue, Jun 28, 2005 at 11:24:59AM -0700, Michael G Schwern wrote: > > Its the principle of the thing. Also, not initializing $Verbose and > > $MaxEvalLen seems going a little overboard espcially when it violates the > > docs. Final

Re: Carp vs Carp::Heavy was: Re: [PATCH] Put Carp into the Tarpit (No Carp #2 - Archive::Tar)

2005-07-01 Thread Dave Mitchell
On Tue, Jun 28, 2005 at 11:24:59AM -0700, Michael G Schwern wrote: > Its the principle of the thing. Also, not initializing $Verbose and > $MaxEvalLen seems going a little overboard espcially when it violates the > docs. Finally I threw in "our" onto the globals so one can turn on strict > during

RE: Carp vs Carp::Heavy was: Re: [PATCH] Put Carp into the Tarpit (No Carp #2 - Archive::Tar)

2005-06-29 Thread Konovalov, Vadim
> > cummulative changes, all running ./perl -Ilib -e 'use Carp; 1' > > > > mem used at end total malloced > > 178232 234839 before the changes > > 178232 230735 moving pod to end > > 178232 230735 removing comments > > 178232

Re: Carp vs Carp::Heavy was: Re: [PATCH] Put Carp into the Tarpit (No Carp #2 - Archive::Tar)

2005-06-28 Thread Michael G Schwern
On Tue, Jun 28, 2005 at 10:21:20PM +0100, Dave Mitchell wrote: > On Tue, Jun 28, 2005 at 11:24:59AM -0700, Michael G Schwern wrote: > > Its the principle of the thing. Also, not initializing $Verbose and > > $MaxEvalLen seems going a little overboard espcially when it violates the > > docs. Final

Re: Carp vs Carp::Heavy was: Re: [PATCH] Put Carp into the Tarpit (No Carp #2 - Archive::Tar)

2005-06-28 Thread Dave Mitchell
On Tue, Jun 28, 2005 at 11:24:59AM -0700, Michael G Schwern wrote: > Its the principle of the thing. Also, not initializing $Verbose and > $MaxEvalLen seems going a little overboard espcially when it violates the > docs. Finally I threw in "our" onto the globals so one can turn on strict > during

Re: Carp vs Carp::Heavy was: Re: [PATCH] Put Carp into the Tarpit (No Carp #2 - Archive::Tar)

2005-06-28 Thread Michael G Schwern
On Tue, Jun 28, 2005 at 06:57:40PM +0100, Dave Mitchell wrote: > On Tue, Jun 28, 2005 at 09:57:11AM -0700, Michael G Schwern wrote: > > On Tue, Jun 28, 2005 at 12:56:43PM +0100, Dave Mitchell wrote: > > > Ok, I admit I was wr... wroo... wronnn... Otherwisely Correct > > > > > > Change 25006 by [EM

Re: Carp vs Carp::Heavy was: Re: [PATCH] Put Carp into the Tarpit (No Carp #2 - Archive::Tar)

2005-06-28 Thread Dave Mitchell
On Tue, Jun 28, 2005 at 11:16:41AM -0700, Michael G Schwern wrote: > On Tue, Jun 28, 2005 at 06:59:09PM +0100, Dave Mitchell wrote: > > > > mem used at end total malloced > > > > 178232 234839 before the changes > > > > 178232 230735 moving pod to end > > > > 178

Re: Carp vs Carp::Heavy was: Re: [PATCH] Put Carp into the Tarpit (No Carp #2 - Archive::Tar)

2005-06-28 Thread Michael G Schwern
On Tue, Jun 28, 2005 at 06:59:09PM +0100, Dave Mitchell wrote: > > > mem used at end total malloced > > > 178232234839 before the changes > > > 178232230735 moving pod to end > > > 178232230735 removing comments > > > 178232

Re: Carp vs Carp::Heavy was: Re: [PATCH] Put Carp into the Tarpit (No Carp #2 - Archive::Tar)

2005-06-28 Thread Dave Mitchell
On Tue, Jun 28, 2005 at 09:55:39AM -0700, Michael G Schwern wrote: > On Tue, Jun 28, 2005 at 12:30:19PM +0100, Dave Mitchell wrote: > > cummulative changes, all running ./perl -Ilib -e 'use Carp; 1' > > > > mem used at end total malloced > > 178232 234839 before the chang

Re: Carp vs Carp::Heavy was: Re: [PATCH] Put Carp into the Tarpit (No Carp #2 - Archive::Tar)

2005-06-28 Thread Dave Mitchell
On Tue, Jun 28, 2005 at 09:57:11AM -0700, Michael G Schwern wrote: > On Tue, Jun 28, 2005 at 12:56:43PM +0100, Dave Mitchell wrote: > > Ok, I admit I was wr... wroo... wronnn... Otherwisely Correct > > > > Change 25006 by [EMAIL PROTECTED] on 2005/06/28 11:28:20 > > > > move Carp.pod back

Re: Carp vs Carp::Heavy was: Re: [PATCH] Put Carp into the Tarpit (No Carp #2 - Archive::Tar)

2005-06-28 Thread Michael G Schwern
On Tue, Jun 28, 2005 at 12:56:43PM +0100, Dave Mitchell wrote: > Ok, I admit I was wr... wroo... wronnn... Otherwisely Correct > > Change 25006 by [EMAIL PROTECTED] on 2005/06/28 11:28:20 > > move Carp.pod back into Carp.pm Except now its at the end of the file instead of inline. -- M

Re: Carp vs Carp::Heavy was: Re: [PATCH] Put Carp into the Tarpit (No Carp #2 - Archive::Tar)

2005-06-28 Thread Michael G Schwern
On Tue, Jun 28, 2005 at 12:30:19PM +0100, Dave Mitchell wrote: > cummulative changes, all running ./perl -Ilib -e 'use Carp; 1' > > mem used at end total malloced > 178232234839 before the changes > 178232230735 moving pod to end > 178232

Re: Carp vs Carp::Heavy was: Re: [PATCH] Put Carp into the Tarpit (No Carp #2 - Archive::Tar)

2005-06-28 Thread Tels
-BEGIN PGP SIGNED MESSAGE- Moin Dave, On Tuesday 28 June 2005 13:56, Dave Mitchell wrote: > Ok, I admit I was wr... wroo... wronnn... Otherwisely Correct > > Change 25006 by [EMAIL PROTECTED] on 2005/06/28 11:28:20 > > move Carp.pod back into Carp.pm Thanx for the streamlining. I

Re: Carp vs Carp::Heavy was: Re: [PATCH] Put Carp into the Tarpit (No Carp #2 - Archive::Tar)

2005-06-28 Thread Dave Mitchell
Ok, I admit I was wr... wroo... wronnn... Otherwisely Correct Change 25006 by [EMAIL PROTECTED] on 2005/06/28 11:28:20 move Carp.pod back into Carp.pm -- A walk of a thousand miles begins with a single step... then continues for another 1,999,999 or so.

Re: Carp vs Carp::Heavy was: Re: [PATCH] Put Carp into the Tarpit (No Carp #2 - Archive::Tar)

2005-06-28 Thread Dave Mitchell
On Mon, Jun 27, 2005 at 03:57:23PM -0700, Michael G Schwern wrote: > > mem used at end total malloced command > > 159904 195136 ./perl -Ilib -MExporter -e 1 > > 176330 224251 ./perl -Ilib -e 'use Carp; 1' > > > > it would appear that Carp uses now 1

Re: Carp vs Carp::Heavy was: Re: [PATCH] Put Carp into the Tarpit (No Carp #2 - Archive::Tar)

2005-06-27 Thread Michael G Schwern
On Mon, Jun 27, 2005 at 06:45:47PM +0100, Dave Mitchell wrote: > I've taken the opportunity of make making Carp.pm even lighter (change > #24995), by moving its pod into a separate file Ahh, the great POD stripping "optimization" arises from the past. Documentation should be as close to the code

Re: Carp vs Carp::Heavy was: Re: [PATCH] Put Carp into the Tarpit (No Carp #2 - Archive::Tar)

2005-06-27 Thread Dave Mitchell
I've taken the opportunity of make making Carp.pm even lighter (change #24995), by moving its pod into a separate file, deferring the creation of various package vars until Carp::Heavy is included, and stripping longmess and shortmess so they are just empty hooks that trigger 'require Carp::Heavy'

Re: Carp vs Carp::Heavy was: Re: [PATCH] Put Carp into the Tarpit (No Carp #2 - Archive::Tar)

2005-06-26 Thread chromatic
On Sun, 2005-06-26 at 15:16 +0200, Tels wrote: > So, in conclusion, I think it is worthwhile to apply these changes, > because: > > * no matter how you measure it, memory consumption goes down ... except for all of the duplicate subroutines in all of the patched modules. > * the changes are s

Re: Carp vs Carp::Heavy was: Re: [PATCH] Put Carp into the Tarpit (No Carp #2 - Archive::Tar)

2005-06-26 Thread Michael G Schwern
On Sun, Jun 26, 2005 at 03:16:37PM +0200, Tels wrote: > So, in conclusion, I think it is worthwhile to apply these changes, > because: > > * no matter how you measure it, memory consumption goes down > * the changes are small and pure-perl only > > Does anybody disagree with me? Seems ok to me

Re: Carp vs Carp::Heavy was: Re: [PATCH] Put Carp into the Tarpit (No Carp #2 - Archive::Tar)

2005-06-26 Thread hv
Dave Mitchell <[EMAIL PROTECTED]> wrote: :On Sun, Jun 26, 2005 at 03:16:37PM +0200, Tels wrote: :> * no matter how you measure it, memory consumption goes down : :Only if the whole code body manages to avoid including Carp.pm. As soon as :any module anywhere manages to include it, even indirectly

Re: Carp vs Carp::Heavy was: Re: [PATCH] Put Carp into the Tarpit (No Carp #2 - Archive::Tar)

2005-06-26 Thread Tels
-BEGIN PGP SIGNED MESSAGE- Moin, On Sunday 26 June 2005 14:32, Michael G Schwern wrote: > On Sun, Jun 26, 2005 at 01:58:26PM +0200, Tels wrote: > > (Including vars, because that gives us strict, vars, and warnings as > > a baseline): > strict costs 120K + 8K vm. strict + Exporter is 236K

Re: Carp vs Carp::Heavy was: Re: [PATCH] Put Carp into the Tarpit (No Carp #2 - Archive::Tar)

2005-06-26 Thread Tels
-BEGIN PGP SIGNED MESSAGE- Moin, On Sunday 26 June 2005 18:35, Dave Mitchell wrote: > On Sun, Jun 26, 2005 at 03:16:37PM +0200, Tels wrote: > > * no matter how you measure it, memory consumption goes down > > Only if the whole code body manages to avoid including Carp.pm. As soon > as any

Re: Carp vs Carp::Heavy was: Re: [PATCH] Put Carp into the Tarpit (No Carp #2 - Archive::Tar)

2005-06-26 Thread Dave Mitchell
On Sun, Jun 26, 2005 at 03:16:37PM +0200, Tels wrote: > * no matter how you measure it, memory consumption goes down Only if the whole code body manages to avoid including Carp.pm. As soon as any module anywhere manages to include it, even indirectly (quite likely), its a net loss since as well a

Re: Carp vs Carp::Heavy was: Re: [PATCH] Put Carp into the Tarpit (No Carp #2 - Archive::Tar)

2005-06-26 Thread Tels
-BEGIN PGP SIGNED MESSAGE- Moin, On Sunday 26 June 2005 14:32, Michael G Schwern wrote: > On Sun, Jun 26, 2005 at 01:58:26PM +0200, Tels wrote: > > (Including vars, because that gives us strict, vars, and warnings as > > a baseline): > > > > # ./perl -Ilib -Mvars -le 'print join ("\n", so

Re: Carp vs Carp::Heavy was: Re: [PATCH] Put Carp into the Tarpit (No Carp #2 - Archive::Tar)

2005-06-26 Thread Michael G Schwern
On Sun, Jun 26, 2005 at 01:58:26PM +0200, Tels wrote: > (Including vars, because that gives us strict, vars, and warnings as a > baseline): > > # ./perl -Ilib -Mvars -le 'print join ("\n", sort keys %INC); sleep (100)' > strict.pm > vars.pm > warnings.pm > warnings/register.pm Carp doesn't use a