Author: timbo
Date: Fri Jun 15 15:26:51 2007
New Revision: 9658

Modified:
   dbi/trunk/lib/DBI/ProfileDumper.pm
   dbi/trunk/t/41prof_dump.t
   dbi/trunk/t/80proxy.t
   dbi/trunk/t/85gofer.t

Log:
Use Config{Path_sep} when setting PERL5LIB
Fix examples in DBI/ProfileDumper.pm
Don't test load DBI::ProfileDumper::Apache unless Apache.pm can load.


Modified: dbi/trunk/lib/DBI/ProfileDumper.pm
==============================================================================
--- dbi/trunk/lib/DBI/ProfileDumper.pm  (original)
+++ dbi/trunk/lib/DBI/ProfileDumper.pm  Fri Jun 15 15:26:51 2007
@@ -28,7 +28,7 @@
   $dbh->{Profile} = "!Statement/DBI::ProfileDumper/File:dbi.prof";
 
   # another way to say it
-  use DBI::Profile;
+  use DBI::ProfileDumper;
   $dbh->{Profile} = DBI::ProfileDumper->new(
                         Path => [ '!Statement' ]
                         File => 'dbi.prof' );
@@ -61,7 +61,7 @@
 F<dbi.prof>.  If you want to modify either of these properties, you
 can construct the DBI::ProfileDumper object yourself:
 
-  use DBI::Profile;
+  use DBI::ProfileDumper;
   $dbh->{Profile} = DBI::ProfileDumper->new(
       Path => [ '!Statement' ],
       File => 'dbi.prof'
@@ -175,10 +175,10 @@
 # inherit from DBI::Profile
 use DBI::Profile;
 
-our $VERSION = sprintf("2.%06d", q$Revision$ =~ /(\d+)/o);
-
 our @ISA = ("DBI::Profile");
 
+our $VERSION = sprintf("2.%06d", q$Revision$ =~ /(\d+)/o);
+
 use Carp qw(croak);
 use Fcntl qw(:flock);
 use Symbol;

Modified: dbi/trunk/t/41prof_dump.t
==============================================================================
--- dbi/trunk/t/41prof_dump.t   (original)
+++ dbi/trunk/t/41prof_dump.t   Fri Jun 15 15:26:51 2007
@@ -85,6 +85,12 @@
 
 # should be able to load DBI::ProfileDumper::Apache outside apache
 # this also naturally checks for syntax errors etc.
-require_ok('DBI::ProfileDumper::Apache');
+SKIP: {
+    skip "developer-only test", 1
+        unless -d ".svn" && -f "MANIFEST.SKIP";
+    skip "Apache module not installed", 1
+        unless eval { require Apache };
+    require_ok('DBI::ProfileDumper::Apache')
+}
 
 1;

Modified: dbi/trunk/t/80proxy.t
==============================================================================
--- dbi/trunk/t/80proxy.t       (original)
+++ dbi/trunk/t/80proxy.t       Fri Jun 15 15:26:51 2007
@@ -6,7 +6,7 @@
 
 
 use DBI;
-require Config;
+use Config;
 require VMS::Filespec if $^O eq 'VMS';
 require Cwd;
 
@@ -90,7 +90,7 @@
     # local $ENV{PERLDB_OPTS} = "AutoTrace NonStop=1 LineInfo=dbiproxy.dbg";
 
     # pass our @INC to children (e.g., so -Mblib passes through)
-    $ENV{PERL5LIB} = join(':', @INC);
+    $ENV{PERL5LIB} = join($Config{path_sep}, @INC);
 
     my $dbi_trace_level = DBI->trace(0);
     my @child_args = (

Modified: dbi/trunk/t/85gofer.t
==============================================================================
--- dbi/trunk/t/85gofer.t       (original)
+++ dbi/trunk/t/85gofer.t       Fri Jun 15 15:26:51 2007
@@ -6,6 +6,7 @@
 use warnings;
 
 use Cwd;
+use Config;
 use Data::Dumper;
 use Test::More;
 
@@ -52,7 +53,7 @@
 }
 
 # ensure subprocess (for pipeone and stream transport) will use the same 
modules as us, ie ./blib
-local $ENV{PERL5LIB} = join ":", @INC;
+local $ENV{PERL5LIB} = join $Config{path_sep}, @INC;
 
 
 my $getcwd = getcwd();

Reply via email to