Update Changes, bump version to 0.97_01, make copyright 2006-2010
[gitmo/Class-MOP.git] / lib / Class / MOP / Deprecated.pm
index a3225fe..76c0e74 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.97_01';
 $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,
@@ -22,6 +26,7 @@ my %DeprecatedAt = (
     'Class::MOP::Class::alias_method'                      => 0.93,
     'Class::MOP::Class::compute_all_applicable_methods'    => 0.93,
     'Class::MOP::Class::compute_all_applicable_attributes' => 0.93,
+    'Class::MOP::Class::get_attribute_map' => 0.95,
 
     'Class::MOP::Instance::bless_instance_structure' => 0.93,
 
@@ -111,6 +116,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;
 
@@ -186,6 +206,13 @@ sub compute_all_applicable_attributes {
     shift->get_all_attributes(@_);
 }
 
+sub get_attribute_map {
+    Class::MOP::Deprecated::warn(
+        "The get_attribute_map method has been deprecated.\n");
+
+    shift->_attribute_map(@_);
+}
+
 package
     Class::MOP::Instance;
 
@@ -360,20 +387,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
 
@@ -381,7 +400,7 @@ Goro Fuji E<lt>gfuji@cpan.orgE<gt>
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2006-2009 by Infinity Interactive, Inc.
+Copyright 2006-2010 by Infinity Interactive, Inc.
 
 L<http://www.iinteractive.com>