From 88159aa11999cc57eb6ad0d6d4620bac638329d1 Mon Sep 17 00:00:00 2001 From: Aaron Trevena Date: Mon, 11 Jul 2005 09:56:04 +0000 Subject: [PATCH] update to BeerDB.pm to use env var for DSN details if provided git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@353 48953598-375a-da11-a14b-00016c27c3ee --- META.yml | 2 +- ex/BeerDB.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/META.yml b/META.yml index 0723255..022d222 100644 --- a/META.yml +++ b/META.yml @@ -1,7 +1,7 @@ # http://module-build.sourceforge.net/META-spec.html #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# name: Maypole -version: 2.10_pre2 +version: 2.10_pre2a version_from: lib/Maypole.pm installdirs: site requires: diff --git a/ex/BeerDB.pm b/ex/BeerDB.pm index 6d90b2e..1e4291a 100644 --- a/ex/BeerDB.pm +++ b/ex/BeerDB.pm @@ -6,7 +6,7 @@ sub debug { $ENV{BEERDB_DEBUG} } # This is the sample application. Change this to the path to your # database. (or use mysql or something) use constant DBI_DRIVER => 'SQLite'; -use constant DATASOURCE => 't/beerdb.db'; +use constant DATASOURCE => $ENV{BEERDB_DATASOURCE} || 't/beerdb.db'; BEGIN { my $dbi_driver = DBI_DRIVER; -- 2.39.2