X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FDecoratorLibrary.pm;h=180a959aca8a5ab45fc11680d31db3fb0fee57a9;hb=d9002a8523567e24b0787a81d891928f937bd6af;hp=9eee6ff25e7421aa53112dcdcbc1b2e291f405ee;hpb=764e65c81e9d50b8f4139a126836bf4da03ef97c;p=gitmo%2FMooseX-Types.git diff --git a/t/lib/DecoratorLibrary.pm b/t/lib/DecoratorLibrary.pm index 9eee6ff..180a959 100644 --- a/t/lib/DecoratorLibrary.pm +++ b/t/lib/DecoratorLibrary.pm @@ -59,20 +59,14 @@ coerce MyArrayRefInt02, via {[sort values(%$_)]}, from MyHashRefOfStr, via {[ sort map { length $_ } values(%$_) ]}, - ## Can't do HashRef[ArrayRef] here since if I do HashRef get the via {} - ## Stuff passed as args and the associated prototype messed with it. MST - ## seems to have a line on it but might not fix fixable. - from (HashRef[ArrayRef]), + from HashRef[ArrayRef], via {[ sort map { @$_ } values(%$_) ]}; subtype StrOrArrayRef, as Str|ArrayRef; subtype AtLeastOneInt, - ## Same problem as MyArrayRefInt02, see above. Another way to solve it by - ## forcing some sort of context. Tried to fix this with method prototypes - ## but just couldn't make it work. - as (ArrayRef[Int]), + as ArrayRef[Int], where { @$_ > 0 }; 1;