Adding roles to classes question:

Another question for everyone - is there some way I can extend a class in such a way that it implements another role? For example, say I have a class Class::A that implements role Role::A, and I want it to also implement Role::B (and I provide an implementation), is there any way I can make it so that *every* instance of Class::A implements Role::B, while doing this from a module that doesn't contain Role::B?

To put the same question slightly differently, would it be possible to say "use B_Rollers" (asssuming B_Rollers contains Role::B), and have Role::B attached to Class::A (which is defined elsewhere, eg. in the S32-setting-library?)

Trees question:
        I have a question for ruoso in light of the following IRC exchange:

<ruoso>   what I had in mind is an old project (2007) of a tree-transforming
        actually, at first a tree-matching language
<masak>   that sounds very interesting... for a CPAN module.
<ruoso>   yes... sure... but I was wondering if a Tree role wouldn't be a
        fundamental piece for that to be possible
        but I've already realised it isn't

My related question is, when you say you've "realised it isn't", what did you mean? I'm presuming you realised some alternative way of doing things, and I'm keen to know what that is.

        Thanks all,


| Name: Tim Nelson                 | Because the Creator is,        |
| E-mail:    | I am                           |

Version 3.12
GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y-

Reply via email to