Patrick Meidl wrote: > On Thu, May 10 2012, Dave Howorth <[email protected]> wrote: > >> Given a resultset or schema object, how do I find the DSN to which it >> is connected? (or equivalent information about host & database name >> etc) > > $schema->storage->connect_info->{dsn}; > $rs->result_source->storage->connect_info->{dsn};
Thanks, yes that was enough. In my system connect_info returns an arrayref rather than a hashref, but it has the dsn as element 0. I had read the description of connect_info at http://search.cpan.org/~arodland/DBIx-Class-0.08196/lib/DBIx/Class/Storage/DBI.pm#connect_info but from that I got the impression that it was a mutator method rather than an accessor. It says nothing about a return value. I had decided it would be dangerous to try calling that. So thanks very much for the pointer :) Dave _______________________________________________ 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]
