title: Is there a way to set inheritance in the same module with __PACKAGE__->?
body: <p>For example I want to store the data for a dbi connection on startup so I do not have to initialize it through an object, is their a way to do this in the same package?</p>
  
  <p>Initializing through my object would be:</p>
  
  <pre><code>my $obj = foo-&gt;new;
  my $dbh = $obj-&gt;connect('dbi', 'user', 'pw');
  </code></pre>
  
  <p>But I want to store it at startup to where I can just use</p>
  
  <pre><code>my $obj = foo-&gt;new;
  my $blah = $obj-&gt;selectall_arrayref(...);
  
  
  package foo; 
  
  use strict; 
  use warnings;  
  
  __PACKAGE__-&gt;connect('dbi', 'user', 'pw');    
  
  sub new {   
   my $class = shift;   
   my $self  = {};   
   bless ($self, $class);   
   return $self; 
  }   
  
   sub connect {   
    my $class = shift;   
    my $self  = ref $class || $class;   
    return $self-&gt;(@_);     # Is this possible? 
   }
  </code></pre>