[Dbix-class] Improving Schema::Loader's dump_overwrite behaviour

Matt S Trout dbix-class at trout.me.uk
Tue Jul 18 17:36:11 CEST 2006


Brandon Black wrote:
> On 7/18/06, Nilson Santos Figueiredo Junior <acid06 at gmail.com> wrote:
>> Attached you'll find a patch which changes dump_overwrite behaviour so
>> that when it's false (i.e. it shouldn't overwrite files), instead
>> throwing an exception when an already existing file is found, it
>> merely warns and skips it.
>>
>> This is rather useful when you're e.g. adding new tables to an
>> existing Catalyst application and want to use the Helper with
>> "create=static" for code generation.
>>
>> The patch fixes one test case so that it complies with this new
>> behaviour (thus, Test::Warn was added as a build dependency). It also
>> changes two or three words on the docs reflecting the change.
>>
> 
> Thanks.  Its applied and should show up in the 0.03005 release.

If local $SIG{WARN} would be sufficient to the test please don't add another 
dependency just to get syntactic sugar in code most users will never see.

-- 
      Matt S Trout       Offering custom development, consultancy and support
   Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +



More information about the Dbix-class mailing list