[Dbix-class] schema deploy() method runs successfully yet returnsfalse

Peter Rabbitson rabbit+dbic at rabbit.us
Mon Jun 1 10:27:21 GMT 2009


Hermida, Leandro wrote:
> Hi again,
> 
> After looking at the DBIx::Class::Storage::deploy() subroutine looks
> like there isn’t any interrogation of the overall success of executing
> all the schema DDL statements.  The code is below… maybe there should be
> some scalar variable that is initialized as true in the subroutine yet
> is set to false inside the eval error catch if ($@) {} statement, then
> at the end of the subroutine returning the value of this scalar?
> 

The reason we are not yet doing this, is that it is _expected_ that some
of the statements coming from SQLT will throw an exception. E.g. most
(if not all) producers spit out DROP TABLE x statements, which will fail
if there is no such table.

Something like what you are asking for could be implemented only after
SQLT production is of acceptable quality.



More information about the DBIx-Class mailing list