title: Perl Can't locate object method
body: <p>This is my first time working with perl (v5.28.1). I'm getting the error:  </p>
  
  <pre><code>'Can't locate object method "load" via stepReader (perhaps you forgot to load 'stepReader')'. 
  </code></pre>
  
  <p>When I print something in the file it works, but somehow my method can't be found.</p>
  
  <p>I have <code>stepReader.pm</code> in a subdirectory called <code>src</code></p>
  
  <p>**</p>
  
  <p><strong>example.pm</strong></p>
  
  <pre><code>use lib 'src/';
  use stepReader;
  
  @ISA = ('stepReader');
  
  my $class = stepReader-&gt;load('assets/glasses.STEP');
  </code></pre>
  
  <p><strong>stepReader.pm</strong></p>
  
  <pre><code>package src::stepReader;
  
  use strict;
  use warnings;
  
  sub load {  
      # Variable for file path
      my $filename = @_;
      # Open my file
      open(my $fh, '&lt;:encoding(UTF-8)', $filename)
          or die "Could not open file '$filename' $!";
  
      # Print the file!
      while (my $row = &lt;$fh&gt;) {
          chomp $row;
          print "$row\n";
      }
  
      return bless {}, shift;
  }
  
  print "test if this works!";
  
  1;
  </code></pre>
  
  <p><em>Output:</em></p>
  
  <pre><code>Can't locate object method "load" via package "stepReader" (perhaps you forgot to load "stepReader"?) at example.pm line 6.
  test if this works!
  </code></pre>
  
  <p>I suspect this is something easy, but I hope someone can help me. Thanks in advance</p>