1#!perl 2BEGIN { 3 chdir 't' if -d 't'; 4 require './test.pl'; 5} 6 7plan 5; 8 9sub notdef { undef } 10 11# [perl #97466] 12# These should actually call the sub, instead of testing the sub itself 13ok !defined do { ¬def }, 'defined do { &sub }'; 14ok !defined(scalar(42,¬def)), 'defined(scalar(42,&sub))'; 15ok !defined do{();¬def}, '!defined do{();&sub}'; 16 17# Likewise, these should evaluate @array in scalar context 18no warnings "deprecated"; 19ok defined($false ? $scalar : @array), 'defined( ... ? ... : @array)'; 20ok defined(scalar @array), 'defined(scalar @array)'; 21