[Catalyst] DBIx::Class::Schema::Loader catalyst helper

Octavian Rasnita orasnita at gmail.com
Fri May 29 10:58:20 GMT 2009


From: "Tomas Doran" <bobtfish at bobtfish.net>
> Ivan Wills wrote:
>> At a quick guess it might be that the files generated on windows use \r\n 
>> line endings when trying to update those files on linux it expects just 
>> \n. You could try using dos2unix on the files and see if you still get 
>> the same error.
>
> I guess you'll get the same error, as the md5sum will still change.
>
> Patches to Schema::Loader to strip \r out when calculating the md5s so 
> that it works cross platform, but you still get 'local' linefeeds would 
> probably be good.
>

After using dos2unix, I was able to re-generate the class files.

I think that the hash is created while the data is in memory having just 
"\n" chars in the content, and this \n is translated to \r\n only when the 
file is printed (after creating the hash).

The Catalyst helper could also change any end of line char found in "\n" 
before re calculating the hash from the content of the file.

Octavian




More information about the Catalyst mailing list