title: multiple instances of Singleton CGI Object in perl
body: <p>i hava a cgi page index.cgi and one template of login form as</p>
  
  <p>index.cgi</p>
  
  <pre><code>use Singleton::CGI;
  use Singleton::Session;
  
  $q = new Singleton::CGI();
  $session = new Singleton::Session();
  $template = HTML::Template-&gt;new(filename =&gt; 'login.tmpl');
  
  print $q-&gt;header;
  print $q-&gt;start_html("hello perl");
  print $q;   # printing hash of CGI Object.
  print $session;
  print $template-&gt;output;
  print $q-&gt;end_html;
  
  
  if($q-&gt;param('submit')){
  
  print $q-&gt;header;
  print $q-&gt;start_html("hello user");
  print $q;   # printing hash of CGI Object.
  print $session;
  print $q-&gt;param('text');
  print $q-&gt;end_html;
  
  }
  </code></pre>
  
  <p>login.tmpl:</p>
  
  <pre><code>&lt;form action="/" method="post"&gt;
    &lt;input type="text" name="text"/&gt;
    &lt;input type="submit" name="submit" value="submit"/&gt;
    &lt;/form&gt;
  </code></pre>
  
  <p>here is the output when i get the index.cgi</p>
  
  <p>CGI=HASH(0xbe0510)<br>
  SingletonSession=HASH(0x1e67ee60)</p>
  
  <p>along with form </p>
  
  <p>next when i submit the form then 
  CGI=HASH(0xe2ac500)    alnog with form input value.
  SingletonSession=HASH(0x115dc7a0)</p>
  
  <p>as per my requirement i should only get one session Object.</p>
  
  <p>how should i maintain only one query and session Object through out the application?</p>