generate clearer for !required action attributes
matthewt [Sun, 3 Feb 2008 09:54:30 +0000 (09:54 +0000)]
lib/Reaction/InterfaceModel/Reflector/DBIC.pm

index 2d4e1a3..e986785 100644 (file)
@@ -809,6 +809,8 @@ class DBIC, which {
                      is        => 'rw',
                      isa       => $from_attr->_isa_metadata,
                      required  => $from_attr->is_required,
+                     ($from_attr->is_required
+                       ? () : (clearer => "clear_$attr_name}")),
                      predicate => "has_${attr_name}",
                     );