develooper Front page | perl.perl5.porters | Postings from March 2007

Re: [PATCH] Extend functionality of UNIVERSAL::DOES() so it handles additional roles, and works in subroutine form.

Thread Previous
From:
demerphq
Date:
March 12, 2007 01:35
Subject:
Re: [PATCH] Extend functionality of UNIVERSAL::DOES() so it handles additional roles, and works in subroutine form.
Message ID:
9b18b3110703120135j32eaa1d6j8d16f2e53d60c6b9@mail.gmail.com
On 3/12/07, chromatic <chromatic@wgz.org> wrote:
> On Sunday 11 March 2007 21:19, Dr.Ruud wrote:
>
> > > I support the idea of making ->DOES() work on internal "types"
> > > (ARRAY, REGEX, CODE, etc), but I think this idea is wrong.
>
> > What exactly do you mean by "this idea"? Is it the wrong one that you
> > support?
>
> UNIVERSAL::DOES() is a method.  I believe that it should stay a method and
> that calling methods as functions is horribly wrong and a practice to
> discourage, not encourage.

So you are saying that principle outtrumps practicality.

I disagree pretty strongly. And think that such a view is out of place
in Perl 5.

I think if that view pervails than UNIVERSAL::DOES in its current form
should be removed from blead. It doesnt really advance things, isnt
useful by itself, isnt documented that it needs helper subs from a
different module and in my opinion will just lead to loads of bug
reports.

What does it do that isa() doesnt do? Throw an error if it isnt used
as a method.  And that functionality makes it worth being in core?

Yves


-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

Thread Previous


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