[Bps-public-commit] r15137 - in Class-Load/trunk: . lib/Class

sartak at bestpractical.com sartak at bestpractical.com
Wed Aug 13 15:04:49 EDT 2008


Author: sartak
Date: Wed Aug 13 15:04:41 2008
New Revision: 15137

Modified:
   Class-Load/trunk/   (props changed)
   Class-Load/trunk/lib/Class/Load.pm
   Class-Load/trunk/t/002-try-load-class.t
   Class-Load/trunk/t/003-load-class.t

Log:
 r69499 at onn:  sartak | 2008-08-13 15:04:33 -0400
 Not yet sure if deleting from %INC makes sense, I'll wait on it


Modified: Class-Load/trunk/lib/Class/Load.pm
==============================================================================
--- Class-Load/trunk/lib/Class/Load.pm	(original)
+++ Class-Load/trunk/lib/Class/Load.pm	Wed Aug 13 15:04:41 2008
@@ -41,7 +41,6 @@
         1;
     };
 
-    delete $INC{$file};
     $ERROR = $@;
     return 0;
 }

Modified: Class-Load/trunk/t/002-try-load-class.t
==============================================================================
--- Class-Load/trunk/t/002-try-load-class.t	(original)
+++ Class-Load/trunk/t/002-try-load-class.t	Wed Aug 13 15:04:41 2008
@@ -1,7 +1,7 @@
 #!/usr/bin/env perl
 use strict;
 use warnings;
-use Test::More tests => 18;
+use Test::More tests => 14;
 use Class::Load ':all';
 use lib 't/lib';
 
@@ -17,15 +17,9 @@
 ok(!try_load_class('Class::Load::SyntaxError'), "didn't load class SyntaxError");
 like($Class::Load::ERROR, qr{^Missing right curly or square bracket at });
 
-ok(!try_load_class('Class::Load::Nonexistent'), "didn't load class Nonexistent");
-like($Class::Load::ERROR, qr{^Can't locate Class/Load/Nonexistent.pm in \@INC});
-
-ok(!try_load_class('Class::Load::SyntaxError'), "didn't load class SyntaxError");
-like($Class::Load::ERROR, qr{^Missing right curly or square bracket at });
-
 ok(is_class_loaded('Class::Load::OK'));
 ok(!is_class_loaded('Class::Load::Nonexistent'));
-ok(!is_class_loaded('Class::Load::SyntaxError'));
+ok(is_class_loaded('Class::Load::SyntaxError'));
 
 do {
     package Class::Load::Inlined;

Modified: Class-Load/trunk/t/003-load-class.t
==============================================================================
--- Class-Load/trunk/t/003-load-class.t	(original)
+++ Class-Load/trunk/t/003-load-class.t	Wed Aug 13 15:04:41 2008
@@ -1,7 +1,7 @@
 #!/usr/bin/env perl
 use strict;
 use warnings;
-use Test::More tests => 18;
+use Test::More tests => 14;
 use Class::Load ':all';
 use Test::Exception;
 use lib 't/lib';
@@ -22,19 +22,9 @@
 } qr{^Missing right curly or square bracket at };
 like($Class::Load::ERROR, qr{^Missing right curly or square bracket at });
 
-throws_ok {
-    load_class('Class::Load::Nonexistent')
-} qr{^Can't locate Class/Load/Nonexistent.pm in \@INC};
-like($Class::Load::ERROR, qr{^Can't locate Class/Load/Nonexistent.pm in \@INC});
-
-throws_ok {
-    load_class('Class::Load::SyntaxError')
-} qr{^Missing right curly or square bracket at };
-like($Class::Load::ERROR, qr{^Missing right curly or square bracket at });
-
 ok(is_class_loaded('Class::Load::OK'));
 ok(!is_class_loaded('Class::Load::Nonexistent'));
-ok(!is_class_loaded('Class::Load::SyntaxError'));
+ok(is_class_loaded('Class::Load::SyntaxError'));
 
 do {
     package Class::Load::Inlined;



More information about the Bps-public-commit mailing list