title: Perl - SUPER - Can't locate object method
body: <p>I created following 2 files, but when I run sample.pl, its giving me the following error
  <code>Can't locate object method "new" via package "sample" at sample.pm line 14.</code></p>
  
  <p>Any help is appreciated.</p>
  
  <p>Thanks.</p>
  
  <pre><code>package sample;
  
  use strict;
  
  sub new {
      my $proto = shift;
      my $class = ref($proto) || $proto;
      my %fields = (
                     Debug =&gt; 0,
                     Error =&gt; undef,
                     @_,
                  );
  
      my $self = bless $proto-&gt;SUPER::new(%fields), $class;
      return $self;
  }
  
  1;
  </code></pre>
  
  <p>sample.pl</p>
  
  <pre><code>#!/usr/bin/perl
  use strict;
  use sample;
  
  my $obj = sample-&gt;new();
  
  print "Howdy, sample\n";
  </code></pre>