[Dbix-class] Class::Accessor::Grouped - how to use it?

Joel Bernstein joel at fysh.org
Mon Nov 10 12:43:42 GMT 2008


2008/11/10 q <quarky at quantentunnel.de>:
> it's probably an awful question, but I could not figure out the rationale
> behind the module Class::Accessor::Grouped. The concept of accessors I know
> of, but I do not understand what this "group" thing is all about. Does
> anybody know where I can find more information regarding this? Or maybe a
> short explanation?

I think the Class::Accessor::Grouped POD makes it quite clear. If you
use the "simple" group you get behaviour like Class::Accessor, where
an accessor call hits get_simple($property) and a mutator call hits
set_simple($property, $value). However you also have other option
groups: "inherited", which gives behaviour similar to
Class::Data::Accessor, and "component_class" which is specifically an
accessor for package-names (set it, and the package is loaded before
the property set).

Not to be rude, but did you read the C::A::Grouped manual before
asking this question? I just skimmed it to answer this question and it
seems quite clear.

/joel



More information about the DBIx-Class mailing list