Skip to content

Conversation

jkeenan
Copy link

@jkeenan jkeenan commented Jul 11, 2016

This slight documentation change reflects discussion in GH issue 85.

Cf.: #85

This slight documentation change reflects discussion in GH issue 85.

Cf.: bigpresh#85
Then, you can call the C<database> keyword with the name of the database
connection you want, for example:
Then, you can -- indeed, I<must> -- call the C<database> keyword with the name
of the database connection you want, for example:
Copy link
Contributor

@joshrabinowitz joshrabinowitz Jul 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this phrasing:

Then, you can call the database keyword with the name of the database connection you want.

Note that if you define multiple connections this way, you'll always need to specify which connection you mean. Calling database() with no connection name will use the default unnamed connection details, whereas database($connection_name) will use a connection with the given name.

For example:

 my $default_dbh = database();

bigpresh added a commit that referenced this pull request Aug 19, 2016
This is in response to PR #86, but uses modified wording which I feel is
slightly clearer.
bigpresh added a commit that referenced this pull request Aug 19, 2016
Same clarification of wording from commit 2b36ed5 (in response to PR #86)
applied to the Dancer1 plugin too.
@bigpresh
Copy link
Owner

Thanks for the PR, and sorry for the slow reply. I've gone with a modified version of Josh's wording which I think clarifies it best - in particular, that you can still call database without a connection name, but that you'd get the default un-named connection details in that case.

@bigpresh bigpresh closed this Aug 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants