Still need no warnings 'uninitialized'
Shawn M Moore [Sat, 19 Feb 2011 04:14:53 +0000 (23:14 -0500)]
    ./t/050_metaclasses/019_create_anon_with_required_attr.t has an
    undef warning without this

lib/Class/MOP/Class.pm

index 439c38e..e2170a8 100644 (file)
@@ -461,6 +461,7 @@ sub _remove_generated_metaobjects {
         # we don't want to clean out the namespace now. We can detect
         # that because Moose will explicitly update the singleton
         # cache in Class::MOP.
+        no warnings 'uninitialized';
         my $current_meta = Class::MOP::get_metaclass_by_name($name);
         return if $current_meta ne $self;