- Applied an MS VC++ compilation fix from Taro Nishino. RT #48072
* Class::MOP
- - The load_class function no longer returns a value, since it's return
- value was confusing (either a metaclass object or a class name). It
- either loads a class or dies trying. Addresses RT #45883. (Dave
- Rolsky)
+ - The load_class function just returns true, since it's return value was
+ confusing (either a metaclass object or a class name). It either loads
+ a class or dies trying. In the future, this may change to not return
+ anything. Addresses RT #45883. (Dave Rolsky)
0.92_01 Thu, Sep 10, 2009
* Class::MOP::Package
sub load_class {
load_first_existing_class($_[0]);
- return;
+ # This is done to avoid breaking code which checked the return value. Said
+ # code is dumb. The return value was _always_ true, since it dies on
+ # failure!
+ return 1;
}
sub _is_valid_class_name {
in place of tricks like C<eval "use $module"> or using C<require>
unconditionally.
+If the module cannot be loaded, an exception is thrown.
+
+For historical reasons, this function returns explicitly returns a true value.
+
=item B<Class::MOP::is_class_loaded($class_name)>
Returns a boolean indicating whether or not C<$class_name> has been