From: Dave Rolsky Date: Mon, 6 Apr 2009 15:41:45 +0000 (-0500) Subject: Make initialize_body private to match constructor class. X-Git-Tag: 0.73_02~12 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bfaa304c8cfe9d4ccbf02d83f208ae54e0d708c5;p=gitmo%2FMoose.git Make initialize_body private to match constructor class. --- diff --git a/lib/Moose/Meta/Method/Destructor.pm b/lib/Moose/Meta/Method/Destructor.pm index 610898d..1f5cc87 100644 --- a/lib/Moose/Meta/Method/Destructor.pm +++ b/lib/Moose/Meta/Method/Destructor.pm @@ -38,7 +38,7 @@ sub new { # needed weaken($self->{'associated_metaclass'}); - $self->initialize_body; + $self->_initialize_body; return $self; } @@ -61,6 +61,12 @@ sub is_needed { } 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"; + shift->_initialize_body; +} + +sub _initialize_body { my $self = shift; # TODO: # the %options should also include a both