From: Dave Rolsky Date: Mon, 17 Dec 2007 20:34:20 +0000 (+0000) Subject: Use around for full sugar experience. X-Git-Tag: 0.04~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=eb640f6cb4b22fcb15ae8794590f20fa4d634e57;p=gitmo%2FMooseX-StrictConstructor.git Use around for full sugar experience. --- diff --git a/lib/MooseX/StrictConstructor/Meta/Class.pm b/lib/MooseX/StrictConstructor/Meta/Class.pm index 78a639d..d3a9694 100644 --- a/lib/MooseX/StrictConstructor/Meta/Class.pm +++ b/lib/MooseX/StrictConstructor/Meta/Class.pm @@ -9,12 +9,13 @@ use Moose; extends 'Moose::Meta::Class'; -override 'make_immutable' => sub ## no critic RequireArgUnpacking +around 'make_immutable' => sub ## no critic RequireArgUnpacking { + my $orig = shift; my $self = shift; return - $self->SUPER::make_immutable + $self->$orig ( constructor_class => 'MooseX::StrictConstructor::Meta::Method::Constructor', @_, );