<?xml version="1.0" encoding="windows-1252"?>
<node id="891843" title="Re^3: Simple Module Tutorial" created="2011-03-07 11:11:36" updated="2011-03-07 11:11:36">
<type id="11">
note</type>
<author id="961">
Anonymous Monk</author>
<data>
<field name="doctext">
&lt;p&gt;Dear toolic,&lt;/p&gt;

&lt;p&gt;Thank you for your reply. I now have changed all instances of "Test" with "MyModule" and also changed the name of the module. MyModule.pm is now situated on&lt;/p&gt;
&lt;code&gt;/storage/username/local/perl/site/lib&lt;/code&gt;
&lt;p&gt;and I use&lt;/p&gt;
&lt;code&gt;use lib '/storage/username/local/perl/site/lib';&lt;/code&gt;
with the second case (as per the example):
&lt;code&gt;# case 2
use MyModule;
print func1(@list),"\n";
print MyModule::func2(@list),"\n";&lt;/code&gt;
&lt;p&gt;but I still get the same error:
&lt;code&gt;Undefined subroutine &amp;main::func1 called at MyScript line 15.&lt;/code&gt;
&lt;p&gt;Just to make sure I copied the module exactly from the example but to no avail. Interestingly, when I comment out the &lt;code&gt;print func1&lt;/code&gt; part, the line after that produces correct output. I hope that someone could point out to me where I am at fault.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Gideon&lt;/p&gt;</field>
<field name="root_node">
102347</field>
<field name="parent_node">
891832</field>
<field name="reputation">
2</field>
</data>
</node>
