http://cvs.fedoraproject.org/viewvc/devel/perl-Devel-Profiler/perl-Devel-Profiler-perl510.patch --- Devel-Profiler-0.04/lib/Devel/Profiler.pm +++ Devel-Profiler-0.04/lib/Devel/Profiler.pm @@ -151,9 +151,14 @@ sub scan { } # found a code ref? then instrument it - instrument($pkg, $sym, $code) - if defined($code = *{$glob}{CODE}) and ref $code eq 'CODE'; - + if (ref \$glob ne 'GLOB') { + # Something stranger in the typeglob, which will expand to (at + # least) a prototype if we take a reference to it. + instrument($pkg, $sym, \&{"$pkg$sym"}); + } else { + instrument($pkg, $sym, $code) + if defined($code = *{$glob}{CODE}) and ref $code eq 'CODE'; + } } } } --- Devel-Profiler-0.04/t/09fcntl.t +++ Devel-Profiler-0.04/t/09fcntl.t @@ -8,7 +8,14 @@ foo(); END # make sure the call tree looks right -check_tree(< 5.009) { + # Fcntl's constants are now directly defined, so constant() isn't called. + check_tree(<