[svn:DBD-Pg] r11961 - DBD-Pg/trunk

[email protected]
Newsgroups perl.dbd.pg.changes
Message-ID <[email protected]>
Author: turnstep
Date: Sun Oct 12 09:48:04 2008
New Revision: 11961

Modified:
   DBD-Pg/trunk/Changes
   DBD-Pg/trunk/Makefile.PL

Log:
Strawberry Perl fix.


Modified: DBD-Pg/trunk/Changes
==============================================================================
--- DBD-Pg/trunk/Changes	(original)
+++ DBD-Pg/trunk/Changes	Sun Oct 12 09:48:04 2008
@@ -1,5 +1,11 @@
 ('GSM' is Greg Sabino Mullane, [email protected])
 
+2.10.8
+
+	- Adjustment of Makefile.PL to fix problem with Strawberry Perl.
+		Thanks to Martin Evan ([email protected]) and Brian 
+		([email protected]) on the dbi-users list.
+
 2.10.7 Released September 22, 2008 (subversion r11869)
 
 	- Fix test issue when dbname contains dashes.

Modified: DBD-Pg/trunk/Makefile.PL
==============================================================================
--- DBD-Pg/trunk/Makefile.PL	(original)
+++ DBD-Pg/trunk/Makefile.PL	Sun Oct 12 09:48:04 2008
@@ -226,6 +226,22 @@
 	}
 }
 
+sub constants {
+	my $self = shift;
+
+	my $old_constants = $self->SUPER::constants();
+	my $new_constants = '';
+	for my $line (split /\n/ => $old_constants) {
+		if ($line =~ /^INC = .*strawberry.*/ ) {
+			print qq(Strawberry Perl found; adjusting the INC variable;\n);
+			$line . ' -I ' . DBI::DBD::dbd_dbi_arch_dir();
+			print qq(INC is now $line\n);
+		}
+		$new_constants .= "$line\n";
+	}
+	return $new_constants;
+}
+
 sub MY::postamble { ## no critic ProhibitQualifiedSubDeclarations
 	no strict 'subs'; ## no critic ProhibitNoStrict
 	my $string = DBI::DBD->dbd_postamble();
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.