use strict;
use warnings;
use base 'Class::Accessor::Grouped';
+use mro 'c3';
use Carp::Clan qw/^DBIx::Class/;
use Scalar::Util 'weaken';
use namespace::clean;
/);
use overload
- '""' => sub { $_[0]->name };
+ '""' => sub { $_[0]->name },
+ '@{}' => sub { $_[0]->name_parts },
+ fallback => 1;
=head2 new
return bless $self, $class;
}
+=head2 clone
+
+Make a shallow copy of the object.
+
+=cut
+
+sub clone {
+ my $self = shift;
+
+ return bless { %$self }, ref $self;
+}
+
=head2 schema
The schema (or owner) of the object. Returns nothing if L</ignore_schema> is
return $self->name;
}
+=head2 name_parts
+
+Returns an arrayref of the values returned by the methods specified in
+the L<moniker_parts|DBIx::Class::Schema::Loader::Base/moniker_parts> of
+the L</loader> 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<DBIx::Class::Schema::Loader::Table>, L<DBIx::Class::Schema::Loader>,
L<DBIx::Class::Schema::Loader::Base>
-=head1 AUTHOR
+=head1 AUTHORS
-See L<DBIx::Class::Schema::Loader/AUTHOR> and L<DBIx::Class::Schema::Loader/CONTRIBUTORS>.
+See L<DBIx::Class::Schema::Loader/AUTHORS>.
=head1 LICENSE