[Dbix-class] Detecting connection errors

Alberto Luaces aluaces at udc.es
Thu Oct 15 14:09:37 GMT 2015


Will Crawford writes:

> This is because you are using sqlite. You could be intending to call
> ->deploy() rather than trying to select data. Sqlite will create the
> file for you (complete with typo) in this case. But as you haven't
> created any tables in the alternately-spelt database file, you'll get
> an exception.

Thanks, Will.

This makes complete sense, and furthermore, it answers another of my
beginner questions (how to deploy a schema over a new database).

Maybe the saner approach with sqlite could be to check first the
existence of the database file, before trying to connect to it.

-- 
Alberto




More information about the DBIx-Class mailing list