package MY; use strict; use Config; sub constants { my $self = shift; require DBI::DBD; # The problem with stawberry perl is it sets INC on the command line # and that overrides INC in this Makefile unless we set it here. my $old_constants = $self->SUPER::constants(); my $new_constants; foreach my $line ( split(/\n/, $old_constants) ) { if ( $line =~ /^INC = .*strawberry.*/ ) { print qq(Strawberry Perl found; adjusting the INC variable;\n); $line = $line . q( -I) . DBI::DBD::dbd_dbi_arch_dir(); print qq(INC is now $line\n); } $new_constants .= $line . qq(\n); } return $new_constants; }