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(@_); } }; __END__ =head1 AUTHOR Gianni Ceccarelli =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2011 by Gianni Ceccarelli. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3. =cut