in reply to Re^5: Remove roles for an object in perl moose
in thread Remove roles for an object in perl moose

Hi , Somehow, it is like batmobiles only. In the delegation apporach you suggested, is it possible in any way to add all the methods of the class teacher entirely instead of adding all api's. Instead , can we add the entire class to the handles, so that all the methods within the class is accesbile through the classroom object apart from 'teach' method. Thanks, Bala.
  • Comment on Re^6: Remove roles for an object in perl moose

Replies are listed 'Best First'.
Re^7: Remove roles for an object in perl moose
by tobyink (Canon) on Oct 01, 2013 at 21:47 UTC

    OK, here's my take on how the Batmobile could be modelled with roles. It would be cute if it weren't also scary crazy.

    use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name
Re^7: Remove roles for an object in perl moose
by tobyink (Canon) on Oct 01, 2013 at 19:03 UTC

    Hmmm... the Batmobile is an interesting object to model. I'll have a think about it.

    use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name