NEXT
+ [API CHANGES]
+
+ * The long-deprecated alias and excludes options for role applications now
+ issue a deprecation warning. Use -alias and -excludes instead. (Dave
+ Rolsky)
+
[BUG FIXES]
* Inlined code no longer stringifies numeric attribute defaults. (vg, doy)
use Package::DeprecationManager -deprecations => {
'coerce without coercion' => '1.08',
'pre-0.94 MetaRole API' => '0.94',
+ 'alias or excludes' => '0.89',
'Role type' => '0.84',
'subtype without sugar' => '0.72',
'type without sugar' => '0.72',
sub new {
my ($class, %params) = @_;
+ if ( exists $params{excludes} || exists $params{alias} ) {
+ Moose::Deprecated::deprecated(
+ feature => 'alias or excludes',
+ message =>
+ "The alias and excludes options for role application have been renamed -alias and -excludes"
+ );
+ }
+
if ( exists $params{excludes} && !exists $params{'-excludes'} ) {
$params{'-excludes'} = delete $params{excludes};
}
use Moose;
::stderr_is {
- with 'TestRole' => { excludes => 'BUILD' };
+ with 'TestRole' => { -excludes => 'BUILD' };
} '';
sub BUILD { push @CALLS, 'ExplicitClassWithBUILD::BUILD' }
my $p = Point->new( x => 4, y => 3 );
-DoesTranspose->meta->apply( $p, alias => { transpose => 'negated' } );
+DoesTranspose->meta->apply( $p, -alias => { transpose => 'negated' } );
is_deeply($p->negated->inspect, [3, 4]);
is_deeply($p->transpose->inspect, [3, 4]);
package Role::Child;
use Moose::Role;
-with 'Role::Parent' => { alias => { meth1 => 'aliased_meth1', } };
+with 'Role::Parent' => { -alias => { meth1 => 'aliased_meth1', } };
sub meth1 { }