<?xml version="1.0" encoding="windows-1252"?>
<node id="85556" title="Forcing Compile Time Checking That Subs Exist" created="2001-06-04 19:02:32" updated="2005-07-27 04:54:42">
<type id="115">
perlquestion</type>
<author id="48563">
sierrathedog04</author>
<data>
<field name="doctext">
Last January I posted &lt;a href="http://www.perlmonks.org/index.pl?node_id=54322&amp;lastnode_id=6364"&gt; a question on how to force Perl to check at compile time that the subroutines I call exist&lt;/a&gt;.
&lt;p&gt;
The extremely wise Tye advised to "sort your subroutines in reverse topological order (so subroutines are declared before you use them), then call all your subroutines using barewords."
&lt;p&gt;
Recently I was using CGI.pm, and I made the mistake of properly spelling the word "referrer()" instead spelling it "referer()" as CGI.pm demands. The script compiled fine and gave only run-time errors telling me that referrer() does not exist.
&lt;p&gt;Since I did not write CGI.pm I cannot sort it in topological order. How can I force Perl to check that the functions I call in the CPAN modules exist?
 </field>
</data>
</node>
