Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #42371] [TODO] check if object.can(method) in callmethodcc() op

8 views
Skip to first unread message

Paul Cochrane

unread,
Apr 9, 2007, 4:04:36 AM4/9/07
to bugs-bi...@rt.perl.org
# New Ticket Created by Paul Cochrane
# Please include the string: [perl #42371]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=42371 >


In file src/ops/object.ops, in op callmethodcc(), there is the todo item:

"should we check if object.can(method)"

Either make the check or remove the todo item with good reason (and
maybe leave a comment in the source as to why).

Jonathan Worthington

unread,
Apr 9, 2007, 8:12:20 AM4/9/07
to perl6-i...@perl.org
Paul Cochrane (via RT) wrote:
> In file src/ops/object.ops, in op callmethodcc(), there is the todo item:
>
> "should we check if object.can(method)"
>
> Either make the check or remove the todo item with good reason (and
> maybe leave a comment in the source as to why).
>
I think we should not need to do that; find_method will just hand back a
null PMC if it fails to find a method, and then we can test that and
throw an exception if it is null.

Any objections? Otherwise I'll remove this comment in the next couple of
days.

Jonathan

Allison Randal

unread,
Apr 10, 2007, 3:20:01 AM4/10/07
to Jonathan Worthington, perl6-i...@perl.org
Jonathan Worthington wrote:
> Paul Cochrane (via RT) wrote:
>> In file src/ops/object.ops, in op callmethodcc(), there is the todo item:
>>
>> "should we check if object.can(method)"
>>
> I think we should not need to do that; find_method will just hand back a
> null PMC if it fails to find a method, and then we can test that and
> throw an exception if it is null.

Agreed.

Allison

0 new messages