File tree 3 files changed +12
-3
lines changed
3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ requires:
14
14
build_requires :
15
15
Archive::Tar : 0
16
16
ExtUtils::CBuilder : 0.27
17
- Module::Load : 0
18
17
TAP::Harness : 3
19
18
configure_requires :
20
19
ExtUtils::CBuilder : 0.27
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ use warnings FATAL => 'all';
7
7
our $VERSION = 0.003;
8
8
9
9
use Carp ();
10
- use Module::Load ();
10
+ use File::Spec ();
11
11
use Text::ParseWords ();
12
12
13
13
use Library::Build::Config ();
@@ -152,11 +152,20 @@ sub register_help {
152
152
return ;
153
153
}
154
154
155
+ my $load = sub {
156
+ my ($module , $try ) = @_ ;
157
+ my @parts = split /::/, $module ;
158
+ my $file = $^O eq ' MSWin32' ? join " /" , @parts : File::Spec-> catfile(@parts );
159
+ $file .= " .pm" ;
160
+ $file = VMS::Filespec::unixify($file ) if $^O eq ' VMS' ;
161
+ return $try ? eval { require $file } : require $file ;
162
+ };
163
+
155
164
sub mixin {
156
165
my ($self , @modules ) = @_ ;
157
166
for my $module (@modules ) {
158
167
next if $self -> {mixed_in }{$module }++;
159
- Module::Load:: load($module );
168
+ $ load-> ($module , 0 );
160
169
my $method = " $module \: :mixin" ;
161
170
$self -> $method ();
162
171
}
Original file line number Diff line number Diff line change @@ -174,3 +174,4 @@ sub mixin {
174
174
return ;
175
175
}
176
176
177
+ 1;
You can’t perform that action at this time.
0 commit comments