xsawyerx / ref-util-rewriter

Rewrite your code to use Ref::Util
Other
1 stars 2 forks source link

ref $foo ne "ARRAY" is missing the negation #14

Open atoomic opened 5 years ago

atoomic commented 5 years ago

ref $foo ne "ARRAY" should convert to ! is_arrayref($foo) we are missing the negation

perl -Ilib -MRef::Util::Rewriter -E 'say Ref::Util::Rewriter::rewrite_string( q[ ref $foo ne "ARRAY" ] ); '
 is_arrayref($foo)
xsawyerx commented 5 years ago

Nice catch!