package Enigmatic::Role::WithWiring; use DAKKAR::p 'role'; requires 'BUILDARGS'; requires 'wiring'; around BUILDARGS => sub { my $orig = shift; my $class = shift; if ( @_ == 1 && !ref $_[0] ) { return $class->$orig( wiring => $_[0] ); } else { return $class->$orig(@_); } };