On Fri, 14 Nov 2008, Zbigniew Lukasiak wrote:

On Thu, Nov 13, 2008 at 9:11 PM, Octavian Rasnita <[EMAIL PROTECTED]> wrote:
From: "Matt S Trout" <[EMAIL PROTECTED]>

$obj->get_column($col); # COLUMN VALUE

$obj->$col; # ATTRIBUTE VALUE

If I could time travel, I'd make it _get_column so this fact was obvious.
But too much code now relies on it, sadly.

I suspect when we create a new, cleaner row object interface, perhaps as a
factor out in the 09 process, things like get_column will simply go away
so
people don't keep making this mistake.


I remember that in some cases $obj->$row doesn't work and we must use
$obj->get_column('col').

I think this only happens if you call your column 'delete' or 'insert'
or similar.


Expect when you pull fields from a search that were created using functions or aggregates. Would be nice if one could get inflated objs for those too ;)

Jess


_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk

Reply via email to