X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMouse%2FObject.pm;h=feef5cba97b9bf149e6464893b35d178acc1a38c;hb=c6e5eee14b916e727dd973cb19f943eb32a2e28e;hp=20748e99292e3704531c98773733c323e5a06c15;hpb=06a970ab9fb60a4cac5e3f1774cf9a2914c94cc1;p=gitmo%2FMouse.git diff --git a/lib/Mouse/Object.pm b/lib/Mouse/Object.pm index 20748e9..feef5cb 100644 --- a/lib/Mouse/Object.pm +++ b/lib/Mouse/Object.pm @@ -51,8 +51,11 @@ sub BUILDALL { return unless $self->can('BUILD'); for my $class (reverse $self->meta->linearized_isa) { - my $build = do{ no strict 'refs'; *{ $class . '::BUILD' }{CODE} } - or next; + my $build = do{ + no strict 'refs'; + no warnings 'once'; + *{ $class . '::BUILD' }{CODE}; + } or next; $self->$build(@_); } @@ -71,8 +74,11 @@ sub DEMOLISHALL { # that time (at least tests suggest so ;) foreach my $class (@{ Mouse::Util::get_linear_isa(ref $self) }) { - my $demolish = do{ no strict 'refs'; *{ $class . '::DEMOLISH'}{CODE} } - or next; + my $demolish = do{ + no strict 'refs'; + no warnings 'once'; + *{ $class . '::DEMOLISH'}{CODE}; + } or next; $self->$demolish(); }