2008/11/10 Mike. G <[EMAIL PROTECTED]>:
> about this statement:
>
> $new_source->name( \<<SQL );
>
>
> why I can't find out the method name "name" in class ResultSource?
Because it's not a method defined with "sub name { ... }" but a simple
data accessor created with:
__PACKAGE__->mk_group_accessors('simple' => qw/_ordered_columns
_columns _primaries _unique_constraints name resultset_attributes
schema from _relationships column_info_from_storage source_info
source_name/);
Note "name" as the fourth entry on the second line. That creates an
accessor/mutator
method (a combined get and set method) called "name".
mk_group_accessors is inherited
from DBIx::Class, which in turn inherits it from
Class::Accessor::Grouped, which is the property
accessor generator used in the current CPAN release of DBIC.
Hope this helps,
/joel
_______________________________________________
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/[email protected]