From 1776bd778db4f6ed72eed47602877ab7a8fb904f Mon Sep 17 00:00:00 2001 From: dakkar Date: Mon, 29 Aug 2011 13:54:58 +0100 Subject: reflectors, in box, and some refactor --- lib/Enigmatic/Rotor.pm | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'lib/Enigmatic/Rotor.pm') diff --git a/lib/Enigmatic/Rotor.pm b/lib/Enigmatic/Rotor.pm index a600b43..792c7b5 100644 --- a/lib/Enigmatic/Rotor.pm +++ b/lib/Enigmatic/Rotor.pm @@ -14,17 +14,7 @@ has ring_setting => ( default => 0, ); -around BUILDARGS => sub { - my $orig = shift; - my $class = shift; - - if ( @_ == 1 && !ref $_[0] ) { - return $class->$orig( wiring => $_[0] ); - } - else { - return $class->$orig(@_); - } -}; +with 'Enigmatic::Role::WithWiring'; sub map { my $self = shift; -- cgit v1.2.3