Grokbase
Topics Posts Groups | in
x
[ help ]

Rafael Garcia-Suarez (rgarcias...@free.fr)

Profile | Posts (2398)

User Information

Display Name:Rafael Garcia-Suarez
Partial Email Address:rgarcias...@free.fr
Posts:
2398 total
2398 in Perl 5 Porters

5 Most Recent

All Posts
1) Rafael Garcia-Suarez Re: [PATCH Perl 5.9.2] -Wformat
| +1 vote
Thanks, applied as change #24233 to bleadperl.
Perl 5 Porters
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Robin Barker wrote:
> This is a patch against perl-5.9.2 to deal with -Wformat warnings.

Thanks, applied as change #24233 to bleadperl.
2) Rafael Garcia-Suarez Re: need to introduce CLONE2 as an method
| +1 vote
That's exactly the point that bothers me, but apparently I'm bothered by the opposite thing as you,...
Perl 5 Porters
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Steve Peters wrote:
> >
> > Why define a method to return a negative value ? DONT_CLONE() that returns
> > true seems more logical.
>
> The only problem with DONT_CLONE() is the old issue with negative logic
> functions (i.e. return true when false). Thinking in double negatives
> is usually confusing, so if we can avoid it, that would be best.

That's exactly the point that bothers me, but apparently I'm bothered by
the opposite thing as you, so avoid speaking about "intuitive api" in
this thread :)

Not having a function FOO and having a function FOO that returns 0 / ""
/ undef is close. Thus the verb FOO should reflect a setting which is
_not_ the default -- as we force to define the FOO method to have it
return 1 (or another true value).

But not avoiding a double negative when you can do it is not good :)
so names like PREVENT_CLONE or BLOCK_CLONE or ABORT_CLONE might be
better.
3) Rafael Garcia-Suarez Re: need to introduce CLONE2 as an method
| +1 vote
Why define a method to return a negative value ? DONT_CLONE() that returns true seems more logical.
Perl 5 Porters
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Dave Mitchell wrote:
> On Wed, Apr 06, 2005 at 11:02:49PM -0400, Stas Bekman wrote:
> > It's time to write CLONE2 which should be a method, identical to DESTROY,
> > which should be called by perl_clone(), when it sees that the
> > object->can('CLONE2').
>
> After some chatting with Stas, we've come to the conclusion that what he
> needs most is the ability, on a per-class basis, to disable the cloning of
> objects; ie in the child thread, each SvOBJECT() SV becomes an SVt_NULL
> SV. This avoids all the problems of multiple calls to DESTROY, multiple
> pointers to C structures etc.
>
> The question then is how to flag a particular class (and its subclasses)
> as being 'don't clone'.
>
> The current suggestion is to have a class method called SHOULD_CLONE(),
> and just before creating the new thread, this method is called, once per
> stash, in the context of the parent thread. Any stash which has this
> method and where it returns a false value, will be marked as 'don't clone'
> for the duration of the cloning.
>
> Better suggestions for the technique or the method name are welcome :-)

Why define a method to return a negative value ? DONT_CLONE() that returns
true seems more logical.
4) Rafael Garcia-Suarez Re: Change 24194: Mention that select() returns -1 on error,
| +1 vote
Ok, select($$$$) now returns undef on error as of change #24223.
Perl 5 Porters
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Rick Delaney wrote:
> On Thu, Apr 07, 2005 at 08:40:35AM -0700, Yitzchak Scott-Thoennes wrote:
> > On Thu, Apr 07, 2005 at 03:54:45PM +0200, Rafael Garcia-Suarez wrote:
> > >
> > > That's right, however returning 0 on non-error makes sense (see select(2))
> >
> > "0 but true", given the code Gisle has shown.
>
> I don't think so. In particular the HTTP::Daemon code clearly assumes a
> return value of plain 0 is the result of a timeout as described in select(2).
> So the only change that would need to be made would be to return undef
> instead of -1.

Ok, select($$$$) now returns undef on error as of change #24223.
5) Rafael Garcia-Suarez Re: Change 24194: Mention that select() returns -1 on error,
| +1 vote
You mean, return undef instead of -1 ? OK, why not. Only in blead then :)
Perl 5 Porters
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Gisle Aas wrote:
>
> Are you sure we can't just make perl's select behave as I obviously
> thought it did instead?

You mean, return undef instead of -1 ? OK, why not. Only in blead then :)

spacer
Profile | Posts (2398)
Home > People > Rafael Garcia-Suarez