use Class::MOP::Immutable;
BEGIN {
- *IS_RUNNING_ON_5_10 = ($] < 5.009_005)
+ *IS_RUNNING_ON_5_10 = ($] < 5.009_005)
? sub () { 0 }
- : sub () { 1 };
+ : sub () { 1 };
sub HAVE_ISAREV () {
- warn "Class::MOP::HAVE_ISAREV is deprecated and will be removed in a future release. It has always returned 1 anyway.";
+ Carp::cluck("Class::MOP::HAVE_ISAREV is deprecated and will be removed in a future release. It has always returned 1 anyway.");
return 1;
}
our $VERSION = '0.80_01';
our $XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
-our $AUTHORITY = 'cpan:STEVAN';
+our $AUTHORITY = 'cpan:STEVAN';
require XSLoader;
XSLoader::load( __PACKAGE__, $XS_VERSION );
sub accessor_metaclass { 'Class::MOP::Method::Accessor' }
sub process_accessors {
- warn 'The process_accessors method has been made private.'
- . " The public version is deprecated and will be removed in a future release.\n";
+ Carp::cluck('The process_accessors method has been made private.'
+ . " The public version is deprecated and will be removed in a future release.\n");
shift->_process_accessors;
}
}
sub construct_class_instance {
- warn 'The construct_class_instance method has been made private.'
- . " The public version is deprecated and will be removed in a future release.\n";
+ Carp::cluck('The construct_class_instance method has been made private.'
+ . " The public version is deprecated and will be removed in a future release.\n");
shift->_construct_class_instance;
}
sub check_metaclass_compatibility {
- warn 'The check_metaclass_compatibility method has been made private.'
- . " The public version is deprecated and will be removed in a future release.\n";
+ Carp::cluck('The check_metaclass_compatibility method has been made private.'
+ . " The public version is deprecated and will be removed in a future release.\n");
shift->_check_metaclass_compatibility;
}
}
sub construct_instance {
- warn 'The construct_instance method has been made private.'
- . " The public version is deprecated and will be removed in a future release.\n";
+ Carp::cluck('The construct_instance method has been made private.'
+ . " The public version is deprecated and will be removed in a future release.\n");
shift->_construct_instance;
}
}
sub create_meta_instance {
- warn 'The create_meta_instance method has been made private.'
- . " The public version is deprecated and will be removed in a future release.\n";
+ Carp::cluck('The create_meta_instance method has been made private.'
+ . " The public version is deprecated and will be removed in a future release.\n");
shift->_create_meta_instance;
}
}
sub clone_instance {
- warn 'The clone_instance method has been made private.'
- . " The public version is deprecated and will be removed in a future release.\n";
+ Carp::cluck('The clone_instance method has been made private.'
+ . " The public version is deprecated and will be removed in a future release.\n");
shift->_clone_instance;
}
}
sub alias_method {
- warn "The alias_method method is deprecated. Use add_method instead.\n";
+ Carp::cluck("The alias_method method is deprecated. Use add_method instead.\n");
shift->add_method;
}
}
sub compute_all_applicable_methods {
- warn 'The compute_all_applicable_methods method is deprecated.'
- . " Use get_all_methods instead.\n";
+ Carp::cluck('The compute_all_applicable_methods method is deprecated.'
+ . " Use get_all_methods instead.\n");
return map {
{
}
sub compute_all_applicable_attributes {
- warn 'The compute_all_applicable_attributes method has been deprecated.'
- . " Use get_all_attributes instead.\n";
+ Carp::cluck('The compute_all_applicable_attributes method has been deprecated.'
+ . " Use get_all_attributes instead.\n");
shift->get_all_attributes;
}
# for compatibility
sub bless_instance_structure {
- warn 'The bless_instance_structure method is deprecated.'
- . " It will be removed in a future release.\n";
+ Carp::cluck('The bless_instance_structure method is deprecated.'
+ . " It will be removed in a future release.\n");
my ($self, $instance_structure) = @_;
bless $instance_structure, $self->_class_name;
## factory
sub initialize_body {
- warn 'The initialize_body method has been made private.'
- . " The public version is deprecated and will be removed in a future release.\n";
+ Carp::cluck('The initialize_body method has been made private.'
+ . " The public version is deprecated and will be removed in a future release.\n");
shift->_initialize_body;
}
## generators
sub generate_accessor_method {
- warn 'The generate_accessor_method method has been made private.'
- . " The public version is deprecated and will be removed in a future release.\n";
+ Carp::cluck('The generate_accessor_method method has been made private.'
+ . " The public version is deprecated and will be removed in a future release.\n");
shift->_generate_accessor_method;
}
}
sub generate_reader_method {
- warn 'The generate_reader_method method has been made private.'
- . " The public version is deprecated and will be removed in a future release.\n";
+ Carp::cluck('The generate_reader_method method has been made private.'
+ . " The public version is deprecated and will be removed in a future release.\n");
shift->_generate_reader_method;
}
}
sub generate_writer_method {
- warn 'The generate_writer_method method has been made private.'
- . " The public version is deprecated and will be removed in a future release.\n";
+ Carp::cluck('The generate_writer_method method has been made private.'
+ . " The public version is deprecated and will be removed in a future release.\n");
shift->_generate_writer_method;
}
}
sub generate_predicate_method {
- warn 'The generate_predicate_method method has been made private.'
- . " The public version is deprecated and will be removed in a future release.\n";
+ Carp::cluck('The generate_predicate_method method has been made private.'
+ . " The public version is deprecated and will be removed in a future release.\n");
shift->_generate_predicate_method;
}
}
sub generate_clearer_method {
- warn 'The generate_clearer_method method has been made private.'
- . " The public version is deprecated and will be removed in a future release.\n";
+ Carp::cluck('The generate_clearer_method method has been made private.'
+ . " The public version is deprecated and will be removed in a future release.\n");
shift->_generate_clearer_method;
}
## Inline methods
sub generate_accessor_method_inline {
- warn 'The generate_accessor_method_inline method has been made private.'
- . " The public version is deprecated and will be removed in a future release.\n";
+ Carp::cluck('The generate_accessor_method_inline method has been made private.'
+ . " The public version is deprecated and will be removed in a future release.\n");
shift->_generate_accessor_method_inline;
}
}
sub generate_reader_method_inline {
- warn 'The generate_reader_method_inline method has been made private.'
- . " The public version is deprecated and will be removed in a future release.\n";
+ Carp::cluck('The generate_reader_method_inline method has been made private.'
+ . " The public version is deprecated and will be removed in a future release.\n");
shift->_generate_reader_method_inline;
}
}
sub generate_writer_method_inline {
- warn 'The generate_writer_method_inline method has been made private.'
- . " The public version is deprecated and will be removed in a future release.\n";
+ Carp::cluck('The generate_writer_method_inline method has been made private.'
+ . " The public version is deprecated and will be removed in a future release.\n");
shift->_generate_writer_method_inline;
}
}
sub generate_predicate_method_inline {
- warn 'The generate_predicate_method_inline method has been made private.'
- . " The public version is deprecated and will be removed in a future release.\n";
+ Carp::cluck('The generate_predicate_method_inline method has been made private.'
+ . " The public version is deprecated and will be removed in a future release.\n");
shift->_generate_predicate_method_inline;
}
}
sub generate_clearer_method_inline {
- warn 'The generate_clearer_method_inline method has been made private.'
- . " The public version is deprecated and will be removed in a future release.\n";
+ Carp::cluck('The generate_clearer_method_inline method has been made private.'
+ . " The public version is deprecated and will be removed in a future release.\n");
shift->_generate_clearer_method_inline;
}
## cached values ...
sub meta_instance {
- warn 'The meta_instance method has been made private.'
- . " The public version is deprecated and will be removed in a future release.\n";
+ Carp::cluck('The meta_instance method has been made private.'
+ . " The public version is deprecated and will be removed in a future release.\n");
shift->_meta_instance;
}
}
sub attributes {
- warn 'The attributes method has been made private.'
- . " The public version is deprecated and will be removed in a future release.\n";
+ Carp::cluck('The attributes method has been made private.'
+ . " The public version is deprecated and will be removed in a future release.\n");
return shift->_attributes;
}
## method
sub initialize_body {
- warn 'The initialize_body method has been made private.'
- . " The public version is deprecated and will be removed in a future release.\n";
+ Carp::cluck('The initialize_body method has been made private.'
+ . " The public version is deprecated and will be removed in a future release.\n");
shift->_initialize_body;
}
}
sub generate_constructor_method {
- warn 'The generate_constructor_method method has been made private.'
- . " The public version is deprecated and will be removed in a future release.\n";
+ Carp::cluck('The generate_constructor_method method has been made private.'
+ . " The public version is deprecated and will be removed in a future release.\n");
shift->_generate_constructor_method;
}
}
sub generate_constructor_method_inline {
- warn 'The generate_constructor_method_inline method has been made private.'
- . " The public version is deprecated and will be removed in a future release.\n";
+ Carp::cluck('The generate_constructor_method_inline method has been made private.'
+ . " The public version is deprecated and will be removed in a future release.\n");
shift->_generate_constructor_method_inline;
}