From: Florian Ragwitz Date: Mon, 27 Apr 2009 23:08:48 +0000 (+0200) Subject: Disable prototype mismatch warnings for add_package_symbol. X-Git-Tag: 0.84~29 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=26159d550061b6c3865a88c3fe6afd4ac4565d92;p=gitmo%2FClass-MOP.git Disable prototype mismatch warnings for add_package_symbol. --- diff --git a/Changes b/Changes index ded33fd..ea9436a 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,9 @@ Revision history for Perl extension Class-MOP. + * Class::MOP::Package + - Disable prototype mismatch warnings for add_package_symbol. + (Florian Ragwitz) + 0.83 Mon, April 27, 2009 * Class::MOP::Class - Fix segfault when calling get_method_map on a metaclass for an empty diff --git a/lib/Class/MOP/Package.pm b/lib/Class/MOP/Package.pm index 00b7ac7..6cb2e1b 100644 --- a/lib/Class/MOP/Package.pm +++ b/lib/Class/MOP/Package.pm @@ -128,13 +128,13 @@ sub add_package_symbol { my ($name, $sigil, $type) = ref $variable eq 'HASH' ? @{$variable}{qw[name sigil type]} - : $self->_deconstruct_variable_name($variable); + : $self->_deconstruct_variable_name($variable); my $pkg = $self->{'package'}; no strict 'refs'; - no warnings 'redefine', 'misc'; - *{$pkg . '::' . $name} = ref $initial_value ? $initial_value : \$initial_value; + no warnings 'redefine', 'misc', 'prototype'; + *{$pkg . '::' . $name} = ref $initial_value ? $initial_value : \$initial_value; } sub remove_package_glob {