<?xml version="1.0" encoding="windows-1252"?>
<node id="994047" title="Re^2: sub argument passing? (TIMTOWTDI)" created="2012-09-17 10:58:55" updated="2012-09-17 10:58:55">
<type id="11">
note</type>
<author id="961961">
temporal</author>
<data>
<field name="doctext">
&lt;p&gt;Cool, didn't know that Perl supported function prototyping. Looks a bit quicker and dirtier than using [perldoc.perl.org/Params/Check.html|Params::Check] - fewer filtering options, no default values, etc.&lt;/p&gt;

&lt;p&gt;I am gravitating towards creating a separate file which would contain all of my function prototypes and then I would &lt;c&gt;require&lt;/c&gt; that in my module. My module has quite a few functions so this might be the easiest way to keep track of them all and have a single point of change rather than having to track down all that template-building legwork within the subroutines themselves that Params::Check requires.&lt;/p&gt;

&lt;p&gt;Not quite as legible, though. And to heed the docs warning, I could get into trouble writing prototypes for already written functions. So I'll have to do a little checking to make sure I'm not doing anything too silly with how arguments are being passed and unpacked.&lt;/p&gt;

&lt;p&gt;Anyway, thanks for pointing this out [protist] =)&lt;/p&gt;

&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-961961"&gt;
&lt;p&gt;&lt;sup&gt;Strange things are afoot at the Circle-K.&lt;/sup&gt;&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
993555</field>
<field name="parent_node">
993926</field>
</data>
</node>
