| 1 | package lib::require::all; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use 5.008_001; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | our $VERSION = '0.01'; | |||||||||
| 6 | |||||||||||
| 7 | 1 | ▶ | use lib (); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 1 | ▶ | use File::Find; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | 1 | ▶ | sub import { | ||||||||
|
Subroutine
import: called CC=4 SCAR=13.9
| |||||||||||
| 11 | 1 | my($class, @dir) = @_; | |||||||||
| 12 | 1 | ▶ | @dir = ('lib') unless @dir; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 13 | 1 | lib->import(@dir); | |||||||||
| 14 | |||||||||||
| 15 | 1 | for my $dir (@dir) { | |||||||||
| 16 | 1 | my @files; | |||||||||
| 17 | 1 | ▶ | File::Find::find({ no_chdir => 1, wanted => sub { push @files, $_ if /\.pm$/ } }, $dir); | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
Branch: 1 branch
| |||||||||||
| 18 | |||||||||||
| 19 | 1 | for my $file (@files) { | |||||||||
| 20 | 1 | $file =~ s/^\Q$dir\E[\/\\]//; | |||||||||
| 21 | 1 | require $file; | |||||||||
| 22 | } | ||||||||||
| 23 | } | ||||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | 1 | 1; | |||||||||
| 27 | __END__ | ||||||||||