bump version to 0.94
[gitmo/Class-MOP.git] / lib / Class / MOP / Deprecated.pm
index a3225fe..b69c6a4 100644 (file)
@@ -2,9 +2,11 @@ package Class::MOP::Deprecated;
 
 use strict;
 use warnings;
-use Carp qw(cluck);
 
-our $VERSION = '0.92';
+use Carp qw( cluck );
+use Scalar::Util qw( blessed );
+
+our $VERSION = '0.94';
 $VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
@@ -15,6 +17,8 @@ my %DeprecatedAt = (
     'Class::MOP::subname'               => 0.93,
     'Class::MOP::in_global_destruction' => 0.93,
 
+    'Class::MOP::Package::get_method_map' => 0.93,
+
     'Class::MOP::Class::construct_class_instance'          => 0.93,
     'Class::MOP::Class::check_metaclass_compatibility'     => 0.93,
     'Class::MOP::Class::create_meta_instance'              => 0.93,
@@ -111,6 +115,21 @@ sub in_global_destruction {
 package
     Class::MOP::Package;
 
+sub get_method_map {
+    Class::MOP::Deprecated::warn(
+              'The get_method_map method has been made private.'
+            . " The public version is deprecated and will be removed in a future release.\n"
+    );
+    my $self = shift;
+
+    my $map = $self->_full_method_map;
+
+    $map->{$_} = $self->get_method($_)
+        for grep { !blessed( $map->{$_} ) } keys %{$map};
+
+    return $map;
+}
+
 package
     Class::MOP::Module;
 
@@ -360,20 +379,12 @@ Class::MOP::Deprecated - List of deprecated methods
 
 =head1 FUNCTIONS
 
-This class provides methods that have been deprecated but remain for backward compatibility.
-
-If you specify C<< -compatible => $version >>, you can use deprecated features without warnings.
-Note that this special treatment is package-scoped.
-
-=over 4
-
-=item B<Class::MOP::Deprecated::warn($message)>
-
-Checks compatibility for the caller feature, and produces warnings if needed.
-
-This function is used in internals.
+This class provides methods that have been deprecated but remain for backward
+compatibility.
 
-=back
+If you specify C<< -compatible => $version >>, you can use deprecated features
+without warnings. Note that this special treatment is limited to the package
+that loads C<Class::MOP::Deprecated>.
 
 =head1 AUTHORS