X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMouse%2FMeta%2FAttribute.pm;h=3d9b5859d8ae913befa40c827a6a78e841ad7e97;hb=refs%2Ftags%2F0.64;hp=aa92e70a97b74e8ec2db851359598cbf21cecbd0;hpb=4a07d07686d449924ad2ace3cffa03a79fe75951;p=gitmo%2FMouse.git diff --git a/lib/Mouse/Meta/Attribute.pm b/lib/Mouse/Meta/Attribute.pm index aa92e70..3d9b585 100644 --- a/lib/Mouse/Meta/Attribute.pm +++ b/lib/Mouse/Meta/Attribute.pm @@ -52,11 +52,6 @@ sub new { my $args = $class->Mouse::Object::BUILDARGS(@_); - # XXX: for backward compatibility (with method modifiers) - if($class->can('canonicalize_args') != \&canonicalize_args){ - %{$args} = $class->canonicalize_args($name, %{$args}); - } - $class->_process_options($name, $args); $args->{name} = $name; @@ -135,27 +130,6 @@ sub interpolate_class{ return( $class, @traits ); } -sub canonicalize_args{ # DEPRECATED - #my($self, $name, %args) = @_; - my($self, undef, %args) = @_; - - Carp::cluck("$self->canonicalize_args has been deprecated." - . "Use \$self->_process_options instead."); - - return %args; -} - -sub create { # DEPRECATED - #my($self, $class, $name, %args) = @_; - my($self) = @_; - - Carp::cluck("$self->create has been deprecated." - . "Use \$meta->add_attribute and \$attr->install_accessors instead."); - - # noop - return $self; -} - sub _coerce_and_verify { #my($self, $value, $instance) = @_; my($self, $value) = @_; @@ -230,33 +204,6 @@ sub clone_and_inherit_options{ return $attribute_class->new($self->name, $args); } -sub clone_parent { # DEPRECATED - my $self = shift; - my $class = shift; - my $name = shift; - my %args = ($self->get_parent_args($class, $name), @_); - - Carp::cluck("$self->clone_parent has been deprecated." - . "Use \$meta->add_attribute and \$attr->install_accessors instead."); - - $self->clone_and_inherited_args($class, $name, %args); -} - -sub get_parent_args { # DEPRECATED - my $self = shift; - my $class = shift; - my $name = shift; - - for my $super ($class->linearized_isa) { - my $super_attr = $super->can("meta") && $super->meta->get_attribute($name) - or next; - return %{ $super_attr->_create_args }; - } - - $self->throw_error("Could not find an attribute by the name of '$name' to inherit from"); -} - - sub get_read_method { return $_[0]->reader || $_[0]->accessor } @@ -355,11 +302,6 @@ sub install_accessors{ } } - if($attribute->can('create') != \&create){ - # backword compatibility - $attribute->create($metaclass, $attribute->name, %{$attribute}); - } - return; } @@ -419,7 +361,7 @@ Mouse::Meta::Attribute - The Mouse attribute metaclass =head1 VERSION -This document describes Mouse version 0.63 +This document describes Mouse version 0.64 =head1 METHODS