[Bps-public-commit] r14881 - in Class-Require/trunk: t
sartak at bestpractical.com
sartak at bestpractical.com
Wed Aug 6 20:18:43 EDT 2008
Author: sartak
Date: Wed Aug 6 20:18:42 2008
New Revision: 14881
Modified:
Class-Require/trunk/ (props changed)
Class-Require/trunk/t/001-is-class-loaded.t
Log:
r68914 at onn: sartak | 2008-08-06 20:16:52 -0400
Method ISA works too
Modified: Class-Require/trunk/t/001-is-class-loaded.t
==============================================================================
--- Class-Require/trunk/t/001-is-class-loaded.t (original)
+++ Class-Require/trunk/t/001-is-class-loaded.t Wed Aug 6 20:18:42 2008
@@ -1,18 +1,22 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More tests => 3;
+use Test::More tests => 4;
use Class::Require 'is_class_loaded';
ok(is_class_loaded('Class::Require'), "Class::Require is loaded");
-
ok(!is_class_loaded('Class::Require::NONEXISTENT'), "nonexistent class is NOT loaded");
do {
package Class::Require::WithISA;
our @ISA = 'Class::Require';
};
-
ok(is_class_loaded('Class::Require::WithISA'), "class that defines \@ISA is loaded");
+do {
+ package Class::Require::WithMethodISA;
+ sub ISA { 'Class::Require' }
+};
+ok(is_class_loaded('Class::Require::WithMethodISA'), "class that defines a method ISA is loaded (no point in requiring it to be \@ISA)");
+
More information about the Bps-public-commit
mailing list