*** Utils-src.pm	2006-07-19 14:45:18.000000000 -0700
--- Utils.pm	2006-08-10 21:37:33.000000000 -0700
***************
*** 242,262 ****
      my $class = shift;
      my $opts  = shift;
  
!     return if !$opts->{ ignore_loaded }
!         && Class::Inspector->loaded( $class ); # if a symbol entry exists we don't load again
! 
!     # this hack is so we don't overwrite $@ if the load did not generate an error
!     my $error;
!     {
!         local $@;
!         eval "require $class";
!         $error = $@;
!     }
! 
!     die $error if $error;
!     die "require $class was successful but the package is not defined"
!         unless Class::Inspector->loaded($class);
! 
      return 1;
  }
  
--- 242,271 ----
      my $class = shift;
      my $opts  = shift;
  
! 	my $load_type = 'require';
! 	# XXX This works fine: $load_type = 'use'
! 	#     But has been sucessfully argued against for at least the sake of
! 	#     backwards compatibility. --rrb
! 	# if ignore_loaded, or a symbol entry exists we don't load again
! 	if ( $opts->{ ignore_loaded } || !Class::Inspector->loaded( $class ) )
! 	{
! 		#print STDERR qq|ensure_class_loaded() ignoring is-loaded, or not yet loaded, so $load_type'ing "$class"\n|;
! 		# this hack is so we don't overwrite $@ if the load did not generate an error
! 		my $error;
! 		{
! 			local $@;
! 			eval "$load_type $class";
! 			$error = $@;
! 		}
! 
! 		die $error if $error;
! 		die "$load_type $class was successful but the package is not defined"
! 			unless Class::Inspector->loaded($class);
! 	}
! 	else
! 	{
! 		#print STDERR qq|ensure_class_loaded() already loaded, so no $load_type\n|;
! 	}
      return 1;
  }
  
