From: Jesse Luehrs Date: Mon, 9 May 2011 08:12:23 +0000 (-0500) Subject: don't add the warning here until 2.02 X-Git-Tag: 2.0003 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c62b178b3600c180c56fc28d4158df6f1e040e2d;p=gitmo%2FMoose.git don't add the warning here until 2.02 --- diff --git a/Changes b/Changes index 64c39b9..2d25f06 100644 --- a/Changes +++ b/Changes @@ -10,7 +10,9 @@ for, noteworthy changes. * 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 diff --git a/lib/Moose/Meta/Class.pm b/lib/Moose/Meta/Class.pm index 52c9676..31e7eab 100644 --- a/lib/Moose/Meta/Class.pm +++ b/lib/Moose/Meta/Class.pm @@ -130,9 +130,10 @@ sub _anon_cache_key { $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; } diff --git a/lib/Moose/Meta/Role.pm b/lib/Moose/Meta/Role.pm index af4c774..00aa609 100644 --- a/lib/Moose/Meta/Role.pm +++ b/lib/Moose/Meta/Role.pm @@ -606,9 +606,10 @@ sub _anon_cache_key { $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; }