Merge branch 'stable'
[gitmo/Class-MOP.git] / lib / Class / MOP / Class / Immutable / Trait.pm
index 0568ef7..86c02cc 100644 (file)
@@ -32,7 +32,7 @@ sub _immutable_cannot_call {
     Carp::confess "The '$name' method cannot be called on an immutable instance";
 }
 
-for my $name (qw/add_method alias_method remove_method add_attribute remove_attribute remove_package_symbol/) {
+for my $name (qw/add_method alias_method remove_method add_attribute remove_attribute remove_package_symbol add_package_symbol/) {
     no strict 'refs';
     *{__PACKAGE__."::$name"} = sub { _immutable_cannot_call($name) };
 }
@@ -80,15 +80,6 @@ sub _method_map {
     $self->{__immutable}{_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__