From c802d62a3afc99c784cfbb7ca2033930d6537555 Mon Sep 17 00:00:00 2001 From: dakkar Date: Mon, 29 Aug 2011 18:22:24 +0100 Subject: full-machine and tests --- lib/Enigmatic/RotorBox.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/Enigmatic/RotorBox.pm') diff --git a/lib/Enigmatic/RotorBox.pm b/lib/Enigmatic/RotorBox.pm index 57f0a47..caf7ed1 100644 --- a/lib/Enigmatic/RotorBox.pm +++ b/lib/Enigmatic/RotorBox.pm @@ -1,13 +1,14 @@ package Enigmatic::RotorBox; use DAKKAR::p 'class'; use Enigmatic::Rotor; +use Enigmatic::Types 'RotorT'; use MooseX::Types::Structured qw(Map); use MooseX::Types::Moose qw(Str); use Moose::Util::TypeConstraints; has rotorset => ( is => 'ro', - isa => Map[Str,class_type('Enigmatic::Rotor')], + isa => Map[Str,RotorT], lazy_build => 1, traits => ['Hash'], handles => { @@ -26,7 +27,7 @@ sub _build_rotorset { VII => { wiring => 'NZJHGRCXMYSWBOUFAIVLPEKQDT', notches => ['M','Z'] }, VIII => { wiring => 'FKQHTLXOCBJSPDZRAMEWNIUYGV', notches => ['M','Z'] }, Beta => { wiring => 'LEYJVCNIXWPBQMDRTAKZGFUHOS', notches => [] }, - Gamma => { wiring => 'FSOKANUERHMBTIYCWLQPZXVGJD', notches => [''] }, + Gamma => { wiring => 'FSOKANUERHMBTIYCWLQPZXVGJD', notches => [] }, ); $_ = Enigmatic::Rotor->new($_) for values %rotors; -- cgit v1.2.3