is(
$aofi->_inline_check('$foo'),
- q{ref $foo eq 'ARRAY' && &List::MoreUtils::all( sub { defined $_ && ! ref $_ && $_ !~ /Q/ }, @{$foo} )},
+ q{ref($foo) eq "ARRAY" && &List::MoreUtils::all(sub { defined $_ && ! ref $_ && $_ !~ /Q/ }, @{$foo})},
'got expected inline code for ArrayRef[Inlinable] constraint'
);
is(
$aofi->_inline_check('$foo'),
- q{ref $foo eq 'ARRAY' && &List::MoreUtils::all( sub { defined $_ && ! ref $_ && $_ !~ /Q/ }, @{$foo} )},
+ q{ref($foo) eq "ARRAY" && &List::MoreUtils::all(sub { defined $_ && ! ref $_ && $_ !~ /Q/ }, @{$foo})},
'got expected inline code for ArrayOfInlinable constraint'
);
is(
$hoaofi->_inline_check('$foo'),
- q{ref $foo eq 'HASH' && &List::MoreUtils::all( sub { ref $_ eq 'ARRAY' && &List::MoreUtils::all( sub { defined $_ && ! ref $_ && $_ !~ /Q/ }, @{$_} ) }, values %{$foo} )},
+ q{ref($foo) eq "HASH" && &List::MoreUtils::all(sub { ref($_) eq "ARRAY" && &List::MoreUtils::all(sub { defined $_ && ! ref $_ && $_ !~ /Q/ }, @{$_}) }, values %{$foo})},
'got expected inline code for HashRef[ArrayRef[Inlinable]] constraint'
);
is(
$iunion->_inline_check('$foo'),
- '(defined $foo && ! ref $foo && $foo !~ /Q/) || (Scalar::Util::blessed( $foo ))',
+ '(defined $foo && ! ref $foo && $foo !~ /Q/) || (Scalar::Util::blessed($foo))',
'got expected inline code for Inlinable | Object constraint'
);
is(
$iunion->_inline_check('$foo'),
- '(Scalar::Util::blessed( $foo )) || (defined $foo && ! ref $foo && $foo !~ /Q/)',
+ '(Scalar::Util::blessed($foo)) || (defined $foo && ! ref $foo && $foo !~ /Q/)',
'got expected inline code for Object | Inlinable constraint'
);
is(
$iunion->_inline_check('$foo'),
- q{(Scalar::Util::blessed( $foo )) || (defined $foo && ! ref $foo && $foo !~ /Q/) || (ref $foo eq 'CODE')},
+ q{(Scalar::Util::blessed($foo)) || (defined $foo && ! ref $foo && $foo !~ /Q/) || (ref($foo) eq "CODE")},
'got expected inline code for Object | Inlinable | CodeRef constraint'
);