better error reporting and some sugar for upcoming code generator.
groditi [Wed, 12 Mar 2008 00:55:49 +0000 (00:55 +0000)]
lib/Reaction/InterfaceModel/ObjectClass.pm
lib/Reaction/UI/LayoutSet.pm

index 7a3497c..2ea5fb6 100644 (file)
@@ -9,6 +9,14 @@ class ObjectClass which {
 
   overrides default_base => sub { ('Reaction::InterfaceModel::Object') };
 
+  overrides exports_for_package => sub {
+    my ($self, $package) = @_;
+    return (super(),
+            domain_model => sub {
+              $package->meta->add_domain_model(@_);
+            },
+           );
+  };
 };
 
 1;
index b424730..edb0952 100644 (file)
@@ -89,7 +89,7 @@ class LayoutSet which {
       } elsif ($data =~ /^cut/) {
         # no-op
       } else {
-        confess "Unparseable directive ${data}";
+        confess "Unparseable directive ${data} in ${file}";
       }
     }
   };