git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Baudis <pasky@suse.cz>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org, "Randal L.Schwartz" <merlyn@stonehenge.com>
Subject: Re: [PATCH] Eliminate Scalar::Util usage from private-Error.pm
Date: Wed, 26 Jul 2006 04:15:50 +0200	[thread overview]
Message-ID: <20060726021550.GX13776@pasky.or.cz> (raw)
In-Reply-To: <7vhd15cfaj.fsf@assigned-by-dhcp.cox.net>

Dear diary, on Wed, Jul 26, 2006 at 03:42:44AM CEST, I got a letter
where Junio C Hamano <junkio@cox.net> said that...
> Petr Baudis <pasky@suse.cz> writes:
> 
> > diff --git a/perl/private-Error.pm b/perl/private-Error.pm
> > index ebd0749..8fff866 100644
> > --- a/perl/private-Error.pm
> > +++ b/perl/private-Error.pm
> > @@ -290,6 +288,14 @@ use vars qw(@EXPORT_OK @ISA %EXPORT_TAGS
> >  
> >  @ISA = qw(Exporter);
> >  
> > +
> > +sub blessed {
> > +	my $item = shift;
> > +	local $@; # don't kill an outer $@
> > +	ref $item and eval { $item->can('can') };
> > +}
> 
> Hmmm.  I wonder how this relates to what Merlyn actually said?
> 
>         From: merlyn@stonehenge.com (Randal L. Schwartz)
>         Subject: Re: [PATCH] Eliminate Scalar::Util usage from private-Error.pm
>         Date: 10 Jul 2006 18:42:35 -0700
>         Message-ID: <863bd8nchg.fsf@blue.stonehenge.com>
>         Cc: Junio C Hamano <junkio@cox.net>, <git@vger.kernel.org>
>         To: Petr Baudis <pasky@suse.cz>
> 
>         >>>>> "Randal" == Randal L Schwartz <merlyn@stonehenge.com> writes:
>         Randal> sub blessed {
>         Randal> my $item = shift;
>         Randal> local $@; # don't kill an outer $@
>         Randal> ref $item and eval { $item->can('can') };
>         Randal> }
> 
>         Randal> Oops, lose the local $@ line.  Just found out this is a
>         Randal> broken thing in current Perls.  The rest is good though.
> 
>         And thirdly, ignore what I *just* said, and concentrate on what
>         I *previously* said, becaused my testing was off.
> 
> My reading is that (1) the part of the patch should read
> something like this:
> 
>         sub blessed {
>                 my $item = shift;
>                 ref $item and eval { $item->can('can') };
>         }

I don't know, from my late-night understanding it should have the local
line... :-)

> and (2) Merlyn thinks there is a bigger problem than using Scalar::Util
> which should be dealt with first.  Was the use of try{}catch{}
> syntax sugar (and it is easy to leak memory) the issue?  How was
> that resolved?

We never got to producing anything that could trigger the memleak, at
least I wasn't able to reproduce it based on the rather vague
description.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Snow falling on Perl. White noise covering line noise.
Hides all the bugs too. -- J. Putnam

  parent reply	other threads:[~2006-07-26  2:15 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-25 11:57 [PATCH] cvsserver: avoid warning about active db handles Johannes Schindelin
2006-07-25 12:07 ` Martin Langhoff (CatalystIT)
2006-07-25 14:53   ` Johannes Schindelin
2006-07-25 15:52     ` Petr Baudis
2006-07-25 16:10       ` Git.xs problem, was " Johannes Schindelin
2006-07-26  1:03         ` [PATCH] Eliminate Scalar::Util usage from private-Error.pm Petr Baudis
2006-07-26  2:01           ` Johannes Schindelin
2006-07-26  2:03             ` Johannes Schindelin
2006-07-26  2:11               ` Petr Baudis
2006-07-26  2:26                 ` Johannes Schindelin
2006-07-26  2:10             ` Petr Baudis
2006-07-26  2:25               ` Johannes Schindelin
2006-07-26 13:35                 ` Jakub Narebski
2006-07-26 15:17                   ` Johannes Schindelin
2006-07-26 17:59                     ` Luben Tuikov
2006-07-27 12:47                     ` Randal L. Schwartz
2006-07-27 14:00                       ` Johannes Schindelin
2006-07-27 14:22                         ` Randal L. Schwartz
2006-07-27 14:32                           ` Johannes Schindelin
2006-07-26 21:34                 ` Petr Baudis
     [not found]           ` <7vhd15cfaj.fsf@assigned-by-dhcp.cox.net>
2006-07-26  2:15             ` Petr Baudis [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-07-10 13:00 Perl gurus: why do we need Scalar::Util? Petr Baudis
2006-07-11  0:53 ` [PATCH] Eliminate Scalar::Util usage from private-Error.pm Petr Baudis
2006-07-11  1:38   ` Randal L. Schwartz
2006-07-11  1:40     ` Randal L. Schwartz
2006-07-11  1:42       ` Randal L. Schwartz
2006-07-11  1:57   ` Junio C Hamano
2006-07-11  3:38     ` Randal L. Schwartz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060726021550.GX13776@pasky.or.cz \
    --to=pasky@suse.cz \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=merlyn@stonehenge.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).