From: Ben Hutton Date: Fri, 8 Aug 2014 12:55:03 +0000 (+0100) Subject: Update 'as' vs '-as' discussion in ResultSet.pm X-Git-Tag: v0.082800~76 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8f3c14456587f9a8f1f0c6f0c2dc605bec56b4ed;p=dbsrgits%2FDBIx-Class.git Update 'as' vs '-as' discussion in ResultSet.pm Call me pedantic, but I think moving the statment to a new line makes it more prominant. I may have seen it before heading to irc to ask why it's broken. Yes I should have read the section fully, but I didn't. Also made the two statements use the same terminiolgy to be consistent and add context. --- diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index 18cc57d..9a478e4 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -4156,10 +4156,11 @@ names: B You will almost always need a corresponding L attribute when you use L, to instruct DBIx::Class how to store the result of the column. -Also note that the L attribute has nothing to do with the SQL-side 'AS' -identifier aliasing. You can however alias a function, so you can use it in -e.g. an C clause. This is done via the C<-as> B supplied as shown in the example above. =head2 +select @@ -4189,8 +4190,10 @@ Indicates DBIC-side names for object inflation. That is L indicates the slot name in which the column value will be stored within the L object. The value will then be accessible via this identifier by the C method (or via the object accessor B) as shown below. The L attribute has -B with the SQL-side C. See L for details. +with the same name already exists>) as shown below. + +The L attribute has B with the SQL-side identifier +aliasing C. See L for details. $rs = $schema->resultset('Employee')->search(undef, { select => [