title: Can anybody please explain (my $self = shift) in Perl
body: <p>I'm having a really hard time understanding the intersection of OO Perl and <code>my $self = shift;</code> The documentation on these individual elements is great, but none of them that I've found touch on how they work together.</p>
  
  <p>I've been using Moose to make modules with attributes, and of course, it's useful to reference a module's attribute within said module. I've been told over and over again to use <code>my $self = shift;</code> within a subroutine to assign the module's attributes to that variable. This makes sense and works, but when I'm also passing arguments to the subroutine, this process clearly takes the first element of the <code>@ARGV</code> array and assigns it to <code>$self</code> as well. </p>
  
  <p>Can someone offer an explanation of how I can use shift to gain internal access to a module's attributes, while also passing in arguments in the <code>@ARGV</code> array?</p>