From: Jesse Luehrs Date: Mon, 27 Sep 2010 01:52:10 +0000 (-0500) Subject: use cluck for this warning X-Git-Tag: 1.15~31 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=df100ac20ccf4960adef6b04a345ed66132477d8;p=gitmo%2FMoose.git use cluck for this warning --- diff --git a/lib/Moose.pm b/lib/Moose.pm index 56a70c7..a916f6c 100644 --- a/lib/Moose.pm +++ b/lib/Moose.pm @@ -202,11 +202,11 @@ sub init_meta { # also check for inherited non moose 'meta' method? my $existing = $meta->get_method('meta'); if ($existing && !$existing->isa('Class::MOP::Method::Meta')) { - warn "Moose is overwriting an existing method named 'meta' " - . "with its own version, in class $class. If this is actually " - . "what you want, you should remove the existing method, " - . "otherwise, you should pass the '-no_meta => 1' option to " - . "'use Moose'."; + Carp::cluck "Moose is overwriting an existing method named " + . "'meta' with its own version, in class $class. If " + . "this is actually what you want, you should remove " + . "the existing method, otherwise, you should pass " + . "the '-no_meta => 1' option to 'use Moose'."; } $meta->_add_meta_method; } diff --git a/lib/Moose/Role.pm b/lib/Moose/Role.pm index 700ca66..a058222 100644 --- a/lib/Moose/Role.pm +++ b/lib/Moose/Role.pm @@ -137,11 +137,11 @@ sub init_meta { # also check for inherited non moose 'meta' method? my $existing = $meta->get_method('meta'); if ($existing && !$existing->isa('Class::MOP::Method::Meta')) { - warn "Moose::Role is overwriting an existing method named 'meta' " - . "with its own version, in role $role. If this is actually " - . "what you want, you should remove the existing method, " - . "otherwise, you should pass the '-no_meta => 1' option to " - . "'use Moose::Role'."; + Carp::cluck "Moose::Role is overwriting an existing method named " + . "'meta' with its own version, in role $role. If " + . "this is actually what you want, you should remove " + . "the existing method, otherwise, you should pass " + . "the '-no_meta => 1' option to 'use Moose::Role'."; } $meta->_add_meta_method; }