From: gfx Date: Sun, 16 Aug 2009 01:46:40 +0000 (+0900) Subject: add_package_symbol is no longer called from get_package_symbol X-Git-Tag: 0.92_01~26 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2b1fb7dc06b3d3079376692fba02eeba0803504c;p=gitmo%2FClass-MOP.git add_package_symbol is no longer called from get_package_symbol --- diff --git a/lib/Class/MOP/Class/Immutable/Trait.pm b/lib/Class/MOP/Class/Immutable/Trait.pm index 4daf5bc..bb1b7e1 100644 --- a/lib/Class/MOP/Class/Immutable/Trait.pm +++ b/lib/Class/MOP/Class/Immutable/Trait.pm @@ -39,6 +39,7 @@ sub remove_method { _immutable_cannot_call() } sub add_attribute { _immutable_cannot_call() } sub remove_attribute { _immutable_cannot_call() } sub remove_package_symbol { _immutable_cannot_call() } +sub add_package_symbol { _immutable_cannot_call() } sub class_precedence_list { my $orig = shift; @@ -83,15 +84,6 @@ sub get_method_map { $self->{__immutable}{get_method_map} ||= $self->$orig; } -sub add_package_symbol { - my $orig = shift; - my $self = shift; - confess "Cannot add package symbols to an immutable metaclass" - unless ( caller(3) )[3] eq 'Class::MOP::Package::get_package_symbol'; - - $self->$orig(@_); -} - 1; __END__