## now for the intersections
-ok(Moose::Util::TypeConstraints::_detect_type_constraint_intersection($_),
+ok(Moose::Util::TypeConstraints::_detect_type_constraint_intersection($_),
'... this correctly detected intersection (' . $_ . ')')
for (
'Int & Str',
- 'Int&Str',
+ 'Int&Str',
'ArrayRef[Foo] & Int',
- 'ArrayRef[Foo]&Int',
+ 'ArrayRef[Foo]&Int',
'Int & ArrayRef[Foo]',
- 'Int&ArrayRef[Foo]',
+ 'Int&ArrayRef[Foo]',
'ArrayRef[Foo | Int] & Str',
- 'ArrayRef[Foo|Int]&Str',
- 'Str & ArrayRef[Foo | Int]',
- 'Str&ArrayRef[Foo|Int]',
- 'Some&Silly&Name&With&Pipes & Int',
- 'Some&Silly&Name&With&Pipes&Int',
+ 'ArrayRef[Foo|Int]&Str',
+ 'Str & ArrayRef[Foo | Int]',
+ 'Str&ArrayRef[Foo|Int]',
+ 'Some&Silly&Name&With&Pipes & Int',
+ 'Some&Silly&Name&With&Pipes&Int',
);
-ok(!Moose::Util::TypeConstraints::_detect_type_constraint_intersection($_),
+ok(!Moose::Util::TypeConstraints::_detect_type_constraint_intersection($_),
'... this correctly detected a non-intersection (' . $_ . ')')
for (
'Int',
'ArrayRef[Foo | Int]',
- 'ArrayRef[Foo|Int]',
+ 'ArrayRef[Foo|Int]',
);
{
my %split_tests = (
'Int & Str' => [ 'Int', 'Str' ],
- 'Int&Str' => [ 'Int', 'Str' ],
+ 'Int&Str' => [ 'Int', 'Str' ],
'ArrayRef[Foo] & Int' => [ 'ArrayRef[Foo]', 'Int' ],
- 'ArrayRef[Foo]&Int' => [ 'ArrayRef[Foo]', 'Int' ],
+ 'ArrayRef[Foo]&Int' => [ 'ArrayRef[Foo]', 'Int' ],
'Int & ArrayRef[Foo]' => [ 'Int', 'ArrayRef[Foo]' ],
- 'Int&ArrayRef[Foo]' => [ 'Int', 'ArrayRef[Foo]' ],
+ 'Int&ArrayRef[Foo]' => [ 'Int', 'ArrayRef[Foo]' ],
'ArrayRef[Foo | Int] & Str' => [ 'ArrayRef[Foo | Int]', 'Str' ],
- 'ArrayRef[Foo|Int]&Str' => [ 'ArrayRef[Foo|Int]', 'Str' ],
- 'Str & ArrayRef[Foo | Int]' => [ 'Str', 'ArrayRef[Foo | Int]' ],
- 'Str&ArrayRef[Foo|Int]' => [ 'Str', 'ArrayRef[Foo|Int]' ],
- 'Some&Silly&Name&With&Pipes & Int' => [ 'Some', 'Silly', 'Name', 'With', 'Pipes', 'Int' ],
- 'Some&Silly&Name&With&Pipes&Int' => [ 'Some', 'Silly', 'Name', 'With', 'Pipes', 'Int' ],
+ 'ArrayRef[Foo|Int]&Str' => [ 'ArrayRef[Foo|Int]', 'Str' ],
+ 'Str & ArrayRef[Foo | Int]' => [ 'Str', 'ArrayRef[Foo | Int]' ],
+ 'Str&ArrayRef[Foo|Int]' => [ 'Str', 'ArrayRef[Foo|Int]' ],
+ 'Some&Silly&Name&With&Pipes & Int' => [ 'Some', 'Silly', 'Name', 'With', 'Pipes', 'Int' ],
+ 'Some&Silly&Name&With&Pipes&Int' => [ 'Some', 'Silly', 'Name', 'With', 'Pipes', 'Int' ],
);
is_deeply(