-
- # TODO: I think we should also load these classes, in case there is any
- # custom code. It would save the developer from needing to put
- # lots of use MyApp::SomeTable statements in the driver, and should
- # help eliminate some of those annoying silent errors if there's a
- # syntax error.
+
+ # Load custom model code, if it exists - nb this must happen after the
+ # unshift, to allow code attributes to work
+ eval "use $subclass";
+ die "Error loading $subclass: $@"
+ if $@ and $@ !~ /Can\'t locate \S+ in \@INC/;