From: Shawn M Moore Date: Fri, 15 Jun 2012 18:11:03 +0000 (-0500) Subject: Don't really like the parameter "superclass" X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8f102c86c9f76bb5ac40bde661c6f665fc9c0b4f;p=gitmo%2FMoose.git Don't really like the parameter "superclass" --- diff --git a/lib/Moose/Util.pm b/lib/Moose/Util.pm index a124283..4b21967 100644 --- a/lib/Moose/Util.pm +++ b/lib/Moose/Util.pm @@ -478,21 +478,21 @@ sub throw { my %args = @_; - my $superclass = delete($args{superclass}) || 'Moose::Exception'; + my $class = delete($args{class}) || 'Moose::Exception'; my $roles = delete($args{roles}); my $metaclass; - load_class($superclass); + load_class($class); if ($roles) { $metaclass = Moose::Meta::Class->create_anon_class( - superclasses => [$superclass], + superclasses => [$class], roles => $roles, ); } else { - $metaclass = Moose::Meta::Class->initialize($superclass); + $metaclass = Moose::Meta::Class->initialize($class); } $metaclass->name->throw(\%args);