title: Perl: Adding writer in Moose class denies attribute access
body: <p>I just started learning Moose, and I've created a very basic class.  Here is my code:</p>
  
  <p><strong>Person.pm</strong></p>
  
  <pre><code>package Person;
  
  use Moose;
  
  has fname =&gt; (
    is =&gt; 'rw',
    isa =&gt; 'Str',
    reader =&gt; 'getFirstName',
  );
  
  has lname =&gt; (
    is =&gt; 'rw',
    isa =&gt; 'Str',
    reader =&gt; 'getLastName',
    writer =&gt; 'setLastName',
  );
  
  sub printName {
    my $self = shift;
    print $self-&gt;getFirstName() . " " . $self-&gt;getLastName(), "\n";
  }
  
  no Moose;
  __PACKAGE__-&gt;meta-&gt;make_immutable;
  </code></pre>
  
  <p><strong>person.pl</strong></p>
  
  <pre><code>#!/usr/bin/env perl
  
  use strict;
  use warnings;
  use Person;
  
  my $person = Person-&gt;new(fname =&gt; 'jef', lname =&gt; 'blah',);
  print $person-&gt;fname, $person-&gt;lname, "\n";
  $person-&gt;setLastName('bleh');
  $person-&gt;getName();
  </code></pre>
  
  <p>Where this code dies is <strong>line 8</strong>.  It will print out the first name attribute, but it will whine about lname <code>Can't locate object method "lname" via package "Person" at ./person.pl line 8.</code>  Now, if I take out the <code>writer</code> in lname, all is fine, but how does that make sense?  I realize I can use the getters that I created, but I'm curious why a writer would then deny me access to the attribute itself?  I guess I'm not understanding something...</p>