use strict;
use warnings;
-our $VERSION = '0.12';
+our $VERSION = '0.13';
use Scalar::Util 'blessed', 'reftype';
use Carp 'confess';
use Sub::Name 'subname';
use B 'svref_2object';
-use UNIVERSAL::require;
use Sub::Exporter;
use Class::MOP;
# loaded in the symbol table
next if _is_class_already_loaded($super);
# otherwise require it ...
- ($super->require)
- || confess "Could not load module '$super' because : " . $UNIVERSAL::require::ERROR;
- }
+ # NOTE:
+ # just in case the class we are
+ # loading has a locally defined
+ # &require, we make sure that we
+ # use the on in UNIVERSAL
+ my $file = $class . '.pm';
+ $file =~ s{::}{/}g;
+ eval { CORE::require($file) };
+ confess(
+ "Could not load module '$super' because : $@"
+ ) if $@;
+ }
}
sub _is_class_already_loaded {
next if substr($_, -2, 2) eq '::';
return 1 if defined &{"${name}::$_"};
}
- return 0;
+ return 0;
}
1;
=item The #moose channel on irc.perl.org
+=item The Moose mailing list - moose@perl.org
+
=item L<http://forum2.org/moose/>
=item L<http://www.cs.utah.edu/plt/publications/oopsla04-gff.pdf>