vanstyn / RapidApp

Turnkey ajaxy webapps
http://rapi.io
Other
48 stars 15 forks source link

Broken DBD driver does not produce useful err (rapidapp.pl) #132

Open vanstyn opened 9 years ago

vanstyn commented 9 years ago

When bootstrapping a new app with rapidapp.pl and the RapidDbic helper, if the DBD driver being used is broken (such as DBD::mysql), the associated exception doesn't make it through to the console, and instead dies with something like:

Attempt to reload DBIx/Class/Schema/Loader/Base.pm aborted.
Compilation failed in require at ... /DBIx/Class/Schema/Loader.pm line 307.

This came up in #rapidapp and the real error was eventually tracked down by calling rapidapp.pl with:

PERL5OPT=-MDBIx::Class::Schema::Loader::Base

This is really probably also an issue in the vanilla Catalyst DBIC schema helper, but it would be nice to be able to catch this automatically, because this particular case did consume a lot of troubleshooting time...

The first step in addressing this, in my mind, is to break the DBD driver on a test box (by removing the c lib files) and see if the above can be reproduced, and go from there...

Issue as of RapidApp v1.0204

vanstyn commented 9 years ago

More from mst ... this may end up being a rapidapp.pl specific issue after all, and here is where to look:

<mst> well, now you know how to break it
<mst> the question is why it doesn't dynaload right later
<mst> maybe something's eating %ENV
<mst> oh, yeah, that'll be it, something in your code is eating %ENV before it gets 
to loading DBD::mysql