defined(&func) and Exporter

Question

Why are subroutines resulting from constants imported with Exporter are not considered to be defined?

$ perl -MFcntl -le 'print &F_SETLK'
13

shows that a subroutine F_SETLK can be called. But

$ perl -MFcntl -le 'print "undefined" unless defined &F_SETLK'
undefined

shows that it is not considered to be defined.

The consequence is that a constant imported this way can accidentely be overridden by a 'require "fcntl.ph"'.

eval 'sub F_SETLK () {6;}' unless defined(&F_SETLK);

but &F_SETLK is not considered to be defined after the use()age of Fcntl and is thus overridden.

Peter Michael's original post

Next