X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema%2FLoader%2FDBObject.pm;h=a4a9e2cbe399ffc15784f2f68abcc13b434fc267;hb=fc97257196b3cdd3df97526e2545a05d1e7c2b96;hp=1e6df30945f2e0e4dbd9437263b23683ac48f0ef;hpb=848731a7d8dd814bcf8cb982a96033dc40c90697;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/lib/DBIx/Class/Schema/Loader/DBObject.pm b/lib/DBIx/Class/Schema/Loader/DBObject.pm index 1e6df30..a4a9e2c 100644 --- a/lib/DBIx/Class/Schema/Loader/DBObject.pm +++ b/lib/DBIx/Class/Schema/Loader/DBObject.pm @@ -35,6 +35,7 @@ __PACKAGE__->mk_group_accessors(simple => qw/ use overload '""' => sub { $_[0]->name }, + '@{}' => sub { $_[0]->name_parts }, fallback => 1; =head2 new @@ -153,6 +154,20 @@ sub dbic_name { return $self->name; } +=head2 name_parts + +Returns an arrayref of the values returned by the methods specified in +the L of +the L object. The object arrayrefifies to this value. + +=cut + +sub name_parts { + my ($self) = shift; + return [ map { $self->$_ } @{$self->loader->moniker_parts} ]; +} + + =head1 SEE ALSO L, L,