[Dbix-class] EncodedColumn extended behavior RFC

Guillermo Roditi groditi at gmail.com
Thu Feb 7 22:01:01 GMT 2008


It was recently brought to my attention that EncodedColumn will choke
when given a reference. For now, this is OK, because that is undefined
behavior, but I would like to clearly define that behavior for future
cases. Here are some of my ideas, I ask that if you have any opinions
you please chime in.

Option 1) Ignore all reference values. (do not encode them)

Option 2) Develop defined behavior for some types of references.
Here's my ideas so far.
  -For filehandles: take a digest of the entire file's contents
  -For IO::File and Path::Class::File objects, do the same
  -Either dereference and skip encoding or encode the dereferenced
value in scalar references
  -If the value is blessed attempt to look for a stringify function,
otherwise just ignore
  -ignore everything else (don't encode)

Any ideas, suggestions or else?


--Guillermo Roditi



More information about the DBIx-Class mailing list