This discussion should be on the DBIC list really, as it doesn't have much to do with Catalyst.

On 17 Apr 2009, at 03:27, kakim...@tpg.com.au wrote:
Quoting John Romkey <rom...@apocalypse.org>:
Look in the schema file. You see this line?

# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum: XXXXXXXX

it means that you modified that line or something above it...

Yes I do see the line.

If the way the check is to be done is so stringent (ie. permissions on
the files it touches or even new lines, surely, the makers of this
package could come up with somethign better. I don't have the same issue
when using Ruby on Rails' Active Records).



What? There is nothing done with permissions, I have no idea what you're talking about with that.

And I can't think of a better way to ensure that someone hasn't altered the generated code than what is done. Conceptually you _could_ in some way get the optree of the code, rather than the text, and then checksum that (so that you could add new lines and spaces and comments to the generated code), but this is _extremely non- trivial_ to implement, and also still wouldn't provide a way to leave your modifications in place when the code was re-generated, so I don't see any benefit to investigating it.

Saying ActiveRecord doesn't do this isn't really helpful - you're not comparing like with like here.. ActiveRecord does around the same as 'create=dynamic' for schema mode, so there really _is no generated code_, as its introspected each time.

You _can_ do your schema like this if you want to, but that opens a whole load of different issues I won't go into here (which ActiveRecord also suffers from).

Cheers
t0m


_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to