* Caching of anon classes now works more sanely in the presence of role
application parameters - alias and excludes options are taken into account,
- and caching is disabled entirely if other parameters exist. (doy, autarch)
+ and caching is disabled entirely if other parameters exist. Asking for
+ caching (instead of just not weakening) when parameters are given will
+ begin warning in Moose 2.0200. (doy, autarch)
2.0002 Thu, Apr 28, 2011
$excludes = [$excludes] unless ref($excludes) eq 'ARRAY';
if (%$params) {
- warn "Roles with parameters cannot be cached. Consider "
- . "applying the parameters before calling "
- . "create_anon_class, or using 'weaken => 0' instead";
+ # disable this warning until 2.02
+ # warn "Roles with parameters cannot be cached. Consider "
+ # . "applying the parameters before calling "
+ # . "create_anon_class, or using 'weaken => 0' instead";
return;
}
$excludes = [$excludes] unless ref($excludes) eq 'ARRAY';
if (%$params) {
- warn "Roles with parameters cannot be cached. Consider "
- . "applying the parameters before calling "
- . "create_anon_class, or using 'weaken => 0' instead";
+ # disable this warning until 2.02
+ # warn "Roles with parameters cannot be cached. Consider "
+ # . "applying the parameters before calling "
+ # . "create_anon_class, or using 'weaken => 0' instead";
return;
}