<?xml version="1.0" encoding="windows-1252"?>
<node id="1019834" title="Re: Perl semi-object without a constructor" created="2013-02-20 14:35:44" updated="2013-02-20 14:35:44">
<type id="11">
note</type>
<author id="961">
Anonymous Monk</author>
<data>
<field name="doctext">
As far as I can see 'connect' *is* the constructor.
&lt;p&gt;Whenever you see a construct that looks like &lt;code&gt;Module-&gt;subroutine&lt;/code&gt; you should think "Class Method".  The subroutine will be called with the Class name as the 1st parameter, and as expected it's used in a bless command.
&lt;p&gt;Now that $conn is an object, all subroutines in it's class' (Msg) namespace and in the namespaces listed in Msg::ISA, can now be used as methods.  Any such method will receive the blessed reference $conn implicitly as it's 1st parameter.</field>
<field name="root_node">
1019819</field>
<field name="parent_node">
1019819</field>
<field name="reputation">
10</field>
</data>
</node>
