fix for prototype undecl issue when type constraint utils loaded before consumers...
[gitmo/Moose.git] / t / 002_recipe.t
index 0e0b3ed..4e0b571 100644 (file)
@@ -12,8 +12,6 @@ BEGIN {
 
 {
     package BankAccount;
-       use strict;
-       use warnings;
     use Moose;
     
     has 'balance' => (isa => 'Num', is => 'rw', default => 0);
@@ -30,10 +28,10 @@ BEGIN {
             || confess "Account overdrawn";
         $self->balance($current_balance - $amount);
     }
-
-       package CheckingAccount;
-       use strict;
-       use warnings;   
+    
+       __PACKAGE__->meta->make_immutable(debug => 0);
+}{
+       package CheckingAccount;        
        use Moose;
 
        extends 'BankAccount';
@@ -48,6 +46,8 @@ BEGIN {
                        $self->deposit($overdraft_amount);
                }
        };
+
+       __PACKAGE__->meta->make_immutable(debug => 0);
 }
 
 my $savings_account = BankAccount->new(balance => 250);