title: Perl, dynamically include package
body: <p>Let's say I have a perl module file and I want to include and use it dynamically at runtime. Said module includes a class that I need to instantiate without knowing its name  until runtime.</p>
  
  <p>For example,</p>
  
  <pre><code>#inside module.pm
  
  package module;
  
  sub new {
  #setup object
  }
  
  #inside main.pl
  
  #get module.pm as argument
  my $module_var = #load reference to module using text argument?
  my $module_instance = $module_var-&gt;new();
  </code></pre>