in reply to how can I figure out what moniker DBIx::Class::Schema::Loader used for a given table?

It's not a stupid question. DBIC is a weird and deep, but awesome!, space. This one is easy if I understand. This kind of introspection, with $schema->sources, will give you the answer–

my $schema = DBIx::Class::Schema::Loader::make_schema_at(UR_STUFS); for my $moniker ( $schema->sources ) { my $source = $schema->source($moniker); printf "%30s -> %s\n", $source->name, $moniker; }
  • Comment on Re: how can I figure out what moniker DBIx::Class::Schema::Loader used for a given table?
  • Select or Download Code

Replies are listed 'Best First'.
Re^2: how can I figure out what moniker DBIx::Class::Schema::Loader used for a given table?
by tomgracey (Scribe) on Dec 29, 2017 at 11:10 UTC

    Yes I realised this morning I was fixating on the DBIx::Class::Schema::Loader class and forgetting I could inspect the Schema itself! This works perfectly - many thanks for your help!