----- Original Message ----
> From: Ovid <publiustemp-perl6langua...@yahoo.com>
> Eventually, the code broke and threw a bunch of weird "recursive inheritance"
> warnings due to multiple anonymous classes being applied to the object. This
> was *real fun* to debug, but I can imagine a scenario for this being natural:
> Your REST interface returns XML, but sometimes someone wants YAML. So you
> $resultset does Role::Serializable::XML
> But sometimes:
> $resultset does Role::Serializable::YAML
> Since you cache resultsets if they've not changed, you could easily have the
> and YAML roles getting reapplied at runtime multiple times.
Could this issue be mitigated with temp variables?
temp $resultset does Role::Serializable::YAML;
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog - http://use.perl.org/~Ovid/journal/
Twitter - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6