<?xml version="1.0" encoding="windows-1252"?>
<node id="1015011" title="Re: Module's name and file's name" created="2013-01-23 14:57:20" updated="2013-01-23 14:57:20">
<type id="11">
note</type>
<author id="647953">
sundialsvc4</author>
<data>
<field name="doctext">
&lt;p&gt;
It is my understanding that the names should agree because Perl looks for module-files by matching the file name. &amp;nbsp; It reads whatever it finds, of course &lt;em&gt;expecting&lt;/em&gt; that the desired package-name will be defined thereby.
&lt;/p&gt;&lt;p&gt;
However, the formal purpose of the &lt;tt&gt;package&lt;/tt&gt; directive is to introduce a &lt;em&gt;namespace,&lt;/em&gt; and once Perl has been cajoled into reading a source-file, it will of course recognize all of the package (namespace) names found therein. &amp;nbsp; Sometimes there are very good, even compelling, reasons to do just that ... for instance, when you are defining grammars for [mod://Parse::RecDescent] (and I don&amp;rsquo;t know offhand if it is strictly necessary ...), or when you simply have a group of classes that you know will always be used together to help one another out.
&lt;/p&gt;
</field>
<field name="root_node">
1014776</field>
<field name="parent_node">
1014776</field>
</data>
</node>
