don't delete the is option unless it's 'ro' or 'rw'
Jesse Luehrs [Wed, 8 Jul 2009 23:13:34 +0000 (18:13 -0500)]
lib/MooseX/SemiAffordanceAccessor/Role/Attribute.pm

index 3800bd1..5ae19f5 100644 (file)
@@ -18,6 +18,7 @@ before '_process_options' => sub
         if ( $options->{is} eq 'ro' )
         {
             $options->{reader} = $name;
+            delete $options->{is};
         }
         elsif ( $options->{is} eq 'rw' )
         {
@@ -30,9 +31,8 @@ before '_process_options' => sub
             }
 
             $options->{writer} = $prefix . q{_} . $name;
+            delete $options->{is};
         }
-
-        delete $options->{is};
     }
 };