From: Dagfinn Ilmari Mannsåker Date: Fri, 18 Sep 2015 10:31:45 +0000 (+0100) Subject: Fix invalid variable names in ResultSource::View examples X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d296da9b7155fe8e9e0e778c73f26abc18e480af;p=dbsrgits%2FDBIx-Class-Historic.git Fix invalid variable names in ResultSource::View examples --- diff --git a/Changes b/Changes index 1077208..e5c6368 100644 --- a/Changes +++ b/Changes @@ -31,6 +31,7 @@ Revision history for DBIx::Class in error message wording during 0.082800 and a bogus test) * Misc + - Fix invalid variable names in ResultSource::View examples - Skip tests in a way more intelligent and speedy manner when optional dependencies are missing - Make the Optional::Dependencies error messages cpanm-friendly diff --git a/lib/DBIx/Class/ResultSource/View.pm b/lib/DBIx/Class/ResultSource/View.pm index 161a94e..4694c87 100644 --- a/lib/DBIx/Class/ResultSource/View.pm +++ b/lib/DBIx/Class/ResultSource/View.pm @@ -66,12 +66,12 @@ case replaces the view name in a FROM clause in a subselect. Having created the MyApp::Schema::Year2000CDs schema as shown in the SYNOPSIS above, you can then: - $2000_cds = $schema->resultset('Year2000CDs') - ->search() - ->all(); - $count = $schema->resultset('Year2000CDs') - ->search() - ->count(); + $y2000_cds = $schema->resultset('Year2000CDs') + ->search() + ->all(); + $count = $schema->resultset('Year2000CDs') + ->search() + ->count(); If you modified the schema to include a placeholder @@ -85,12 +85,12 @@ and ensuring you have is_virtual set to true: You could now say: - $2001_cds = $schema->resultset('Year2000CDs') - ->search({}, { bind => [2001] }) - ->all(); - $count = $schema->resultset('Year2000CDs') - ->search({}, { bind => [2001] }) - ->count(); + $y2001_cds = $schema->resultset('Year2000CDs') + ->search({}, { bind => [2001] }) + ->all(); + $count = $schema->resultset('Year2000CDs') + ->search({}, { bind => [2001] }) + ->count(); =head1 SQL EXAMPLES