[Dbix-class] RFC: InflateColumn::FS

Marc Mims marc at questright.com
Fri Oct 3 18:37:49 BST 2008


* Matt S Trout <dbix-class at trout.me.uk> [081001 18:40]:
> I'll happily give you svn space for it and we can figure out how to deprecate
> IC::File in favour of it later.

Just let me know when you're ready for it and get it into svn.

> Consider $self->ident_values to get the PK values, IIRC.

Looks like it must be $self->_ident_values.  ::PK::id returns:

    (wantarray ? @pk : $pk[0]);

Although, many of the tables I work with have an 'id' column, so I end
up with an accessor that hides ::PK::id.  It returns the same thing, but
others might have an 'id' column that is not the PK.

In the interest of making it generic, I should probably not rely on the
PK being an int, but the directory tree layout currently depends on it,
and I think it is a reasonably sane default.

Rather than changing the int PK requirement, perhaps anyone wanting
something different should either use the ::SHA1 subclass or derive
their own.  Thoughts?

The ::SHA1 subclass, should be able to accommodate any PK type.
However, I need an algorithm to join the segments of a multi-segment PK
so it's always unique.  A simple join isn't sufficient:

    'A', 'B'  => 'AB'
    'AB', ''  => 'AB' # clash

Perhaps I can just use ::PK::_create_ID for that purpose.  Reasonable?

> Either this is getting uploaded or we're finding a way to integrate it
> into core to replace ::File.

I'm happy with either, just let me know what you prefer.


What about the module name?  Not much thought went into the name IC::FS.

	-Marc



More information about the DBIx-Class mailing list