in reply to Re^3: Using perl 6 roles in perl 5
in thread Using perl 6 roles in perl 5

You're right.

I now need to write another class which inherits the caching but not the database interface functionality from my base classes, and suddenly roles seem like a really really good idea.

And using a contained module seems like a much better idea than the few lines of code which did the job just 2 hours ago.

By improving on the current systems, not by rewriting them.
Out of interest, why did you rewrite Perl6::Role when Class::Role already existed?

Replies are listed 'Best First'.
Re^5: Using perl 6 roles in perl 5
by dragonchild (Archbishop) on Jan 18, 2006 at 19:06 UTC
    It was in response to tbunce's request for a different roles implementation so that DBIv2 could move forward. The feature needed was run-time composition which creates a new class.

    For the record, I wrote Perl6::Roles with the help/support of the authors of the other three roles implementations on CPAN at the time.


    My criteria for good software:
    1. Does it work?
    2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?