projects
/
gitmo/Moose.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
82e3bad
)
add warning for $obj->new
Chris Prather [Wed, 12 Aug 2009 03:12:43 +0000 (23:12 -0400)]
lib/Moose/Object.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Moose/Object.pm
b/lib/Moose/Object.pm
index
8187642
..
940bb6f
100644
(file)
--- a/
lib/Moose/Object.pm
+++ b/
lib/Moose/Object.pm
@@
-18,7
+18,10
@@
our $AUTHORITY = 'cpan:STEVAN';
sub new {
my $class = shift;
-
+
+ Carp::cluck 'Calling new() on an instance is deprecated,'
+ . ' please use (blessed $obj)->new' if blessed $class;
+
my $params = $class->BUILDARGS(@_);
# We want to support passing $self->new, but initialize