title: Why does Moose make_immutable kill this script?
body: <pre><code>package testDB;
  use Moose;
  use Carp;
  use SQL::Library;
  
  has 'lib' =&gt; (#FOLDBEG
      is =&gt; 'rw',
      isa =&gt; 'Str',
      default =&gt; 'default',
      trigger =&gt; \&amp;_sql_lib_builder,
  );#FOLDEND
  
  has 'lib_dir' =&gt; (#FOLDBEG
      is =&gt; 'ro',
      isa =&gt; 'Str',
      default =&gt; '/SQL',
  );#FOLDEND
  
  has '_sql_lib' =&gt; (#FOLDBEG                                                                                                                            
     builder =&gt; '_sql_lib_builder',
      is =&gt; 'rw',
      isa =&gt; 'Str',
  );
  
  has '_sql_lib' =&gt; (#FOLDBEG                                                                                                                            
      builder =&gt; '_sql_lib_builder',
      is =&gt; 'rw',
             handles =&gt; {
          get_sql =&gt; 'retr',
          get_elements =&gt; 'elements',
      },
  );
  
  sub _sql_lib_builder {
      my ($self, $lib) = shift();
      $self-&gt;lib() or die("I am unable to get a lib.");
      $lib = $self-&gt;lib unless $lib;
  
  
      my $lib_dir = $self-&gt;lib_dir;
      print $lib_dir."\n";
  
      my $lib_file = $lib_dir . '/' . $lib . '.sql';
  
      unless (-e $lib_file ) {
          confess "SQL library $lib does not exist";
      }
  
      my $library = new SQL::Library { lib =&gt; $lib_file };
  
      $self-&gt;_sql_lib($library);
  
  }#FOLDEND
  
  __PACKAGE__-&gt;meta-&gt;make_immutable;
  
  my $tdb=testDB-&gt;new();
  </code></pre>
  
  <p>Using perl 5.8.8 and Moose 2.0205</p>
  
  <pre><code>$ perl testDB.pl 
  I am unable to get a lib. at testDB.pl line 35.
  </code></pre>