Author: timbo
Date: Tue May 18 01:37:05 2004
New Revision: 349

Modified:
   dbi/trunk/Changes
   dbi/trunk/DBI.pm
   dbi/trunk/DBI.xs
Log:
Fixed _load_class to propagate $@ thanks to Drew Taylor.
Fixed compile warnings on Win32 thanks to Robert Baron.


Modified: dbi/trunk/Changes
==============================================================================
--- dbi/trunk/Changes   (original)
+++ dbi/trunk/Changes   Tue May 18 01:37:05 2004
@@ -21,6 +21,8 @@
   Fixed propagation of scalar/list context into proxied methods.
   Fixed DBI::Profile::DESTROY to not alter [EMAIL PROTECTED]
   Fixed DBI::ProfileDumper new() docs thanks to Michael Schwern.
+  Fixed _load_class to propagate $@ thanks to Drew Taylor.
+  Fixed compile warnings on Win32 thanks to Robert Baron.
 
   Changed selectall_arrayref() to call finish() if
     $attr->{MaxRows} is defined.

Modified: dbi/trunk/DBI.pm
==============================================================================
--- dbi/trunk/DBI.pm    (original)
+++ dbi/trunk/DBI.pm    Tue May 18 01:37:05 2004
@@ -879,15 +879,15 @@
 
 sub _load_class {
     my ($load_class, $missing_ok) = @_;
-    #DBI->trace_msg("    _load_class($load_class, $missing_ok)\n");
+    DBI->trace_msg("    _load_class($load_class, $missing_ok)\n", 2);
     no strict 'refs';
     return 1 if @{"$load_class\::ISA"};        # already loaded/exists
     (my $module = $load_class) =~ s!::!/!g;
-    #DBI->trace_msg("    _load_class require $module\n");
+    DBI->trace_msg("    _load_class require $module\n", 2);
     eval { require "$module.pm"; };
     return 1 unless $@;
     return 0 if $missing_ok && $@ =~ /^Can't locate \Q$module.pm\E/;
-    die; # propagate $@;
+    die $@;
 }
 
 

Modified: dbi/trunk/DBI.xs
==============================================================================
--- dbi/trunk/DBI.xs    (original)
+++ dbi/trunk/DBI.xs    Tue May 18 01:37:05 2004
@@ -92,8 +92,8 @@
 typedef struct dbi_ima_st {
     U8 minargs;
     U8 maxargs;
-    U8 hidearg;
-    U8 trace_level;
+    IV hidearg;
+    IV trace_level;
     char *usage_msg;
     U32   flags;
 } dbi_ima_t;
@@ -3517,9 +3517,9 @@
        if ( (svp=DBD_ATTRIB_GET_SVP(attribs, "U",1)) != NULL) {
            STRLEN lna;
            AV *av = (AV*)SvRV(*svp);
-           ima->minargs    = SvIV(*av_fetch(av, 0, 1));
-           ima->maxargs    = SvIV(*av_fetch(av, 1, 1));
-                             svp = av_fetch(av, 2, 0);
+           ima->minargs = (U8)SvIV(*av_fetch(av, 0, 1));
+           ima->maxargs = (U8)SvIV(*av_fetch(av, 1, 1));
+           svp = av_fetch(av, 2, 0);
            ima->usage_msg  = savepv( (svp) ? SvPV(*svp,lna) : "");
            ima->flags |= IMA_HAS_USAGE;
            if (trace_msg && DBIS_TRACE_LEVEL >= 11)

Reply via email to