From: Yuval Kogman Date: Thu, 17 Sep 2009 21:07:28 +0000 (+0300) Subject: call warn_on_symbol_pollution in make_immutable X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fabandoned%2Fautoclean_reminder;p=gitmo%2FClass-MOP.git call warn_on_symbol_pollution in make_immutable --- diff --git a/lib/Class/MOP/Class.pm b/lib/Class/MOP/Class.pm index 9fd58db..95806e6 100644 --- a/lib/Class/MOP/Class.pm +++ b/lib/Class/MOP/Class.pm @@ -932,8 +932,14 @@ sub make_immutable { my ( $self, @args ) = @_; if ( $self->is_mutable ) { - $self->_initialize_immutable( $self->_immutable_options(@args) ); + my %options = $self->_immutable_options(@args); + + $self->_initialize_immutable(%options); $self->_rebless_as_immutable(@args); + + $self->warn_on_symbol_pollution + unless $options{no_pollution_check}; + return $self; } else { @@ -1615,6 +1621,10 @@ generate the inlined destructor. This defaults to This is a boolean indicating whether an existing destructor should be replaced when inlining a destructor. This defaults to false. +=item * no_pollution_check + +Suppresses the call to C + =back =item B<< $metaclass->immutable_options >>