}
sub throw {
- my %args;
- if (@_ == 1) {
- $args{message} = shift;
- }
- else {
- %args = @_;
+ if (@_ % 2) {
+ unshift @_, 'message';
}
+ my %args = @_;
+
my $superclass = delete($args{superclass}) || 'Throwable::Error';
my $roles = delete($args{roles});