Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re^2: Introducing MooseX::hasn't

by tobyink (Abbot)
on Apr 02, 2012 at 22:22 UTC ( #963128=note: print w/replies, xml ) Need Help??

in reply to Re: Introducing MooseX::hasn't
in thread Introducing MooseX::hasn't

The link you posted doesn't work.

Thanks, fixed.

If it doesn't support the same operations as Person then in what sense does it extend Person?

See "Doesn't this break polymorphism?" in the FAQ.

Or is this meant to be an Acme type module?

Initially, yes, hence the release date. But I can see potential uses for it.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

Replies are listed 'Best First'.
Re^3: Introducing MooseX::hasn't
by Arunbear (Prior) on Apr 03, 2012 at 10:23 UTC
    It breaks the inheritance contract, not polymorphism per se (I think you've got the two concepts confused). Polymorphism doesn't depend on inheritance, e.g. Roles enable polymorphism without inheritance.

      No, polymorphism doesn't depend on inheritance, and I never claimed that it did. Polymorphism is generally an expected outcome of inheritance though. There are clearly other ways of allowing polymorphism though - roles as you say; also mocking, delegation, etc.

      perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
        From the POD:
        The idea behind polymorphism is that if Bar inherits from Foo, then I should be able to use an object of type Bar wherever I'd normally use Foo.
        That makes it sound like you're equating polymorphism with inheritance.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://963128]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2018-08-20 00:40 GMT
Find Nodes?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:

    Results (188 votes). Check out past polls.