line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Object::Composer; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
125026
|
use strict; |
|
3
|
|
|
|
|
10
|
|
|
3
|
|
|
|
|
160
|
|
4
|
3
|
|
|
3
|
|
18
|
use warnings; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
94
|
|
5
|
3
|
|
|
3
|
|
19
|
use Carp; |
|
3
|
|
|
|
|
18
|
|
|
3
|
|
|
|
|
460
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = q(0.0.2); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub import { |
12
|
3
|
|
|
3
|
|
23
|
no strict 'refs'; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
692
|
|
13
|
|
|
|
|
|
|
|
14
|
3
|
|
|
3
|
|
26
|
shift; |
15
|
|
|
|
|
|
|
|
16
|
3
|
|
|
|
|
8
|
my $caller_package = caller( ); |
17
|
3
|
|
|
|
|
6
|
*{"$caller_package\::load"} = \&{ __PACKAGE__ . '::load' }; |
|
3
|
|
|
|
|
39
|
|
|
3
|
|
|
|
|
8
|
|
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub load { |
22
|
4
|
|
|
4
|
1
|
3011
|
my ( @all ) = @_; |
23
|
|
|
|
|
|
|
|
24
|
4
|
50
|
|
|
|
16
|
croak 'No arguments given, not sure what you want me to do?' |
25
|
|
|
|
|
|
|
unless @all; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
# Getting called as a Class Method / Object Instance method |
28
|
|
|
|
|
|
|
# ignore the first argument |
29
|
4
|
100
|
66
|
|
|
59
|
shift if $all[0] eq __PACKAGE__ || $all[0]->isa( __PACKAGE__ ); |
30
|
|
|
|
|
|
|
|
31
|
4
|
|
|
|
|
6
|
my $obj; |
32
|
4
|
|
|
|
|
12
|
my ( $package, @args ) = @_; |
33
|
|
|
|
|
|
|
|
34
|
4
|
|
|
|
|
13
|
my $code = < |
35
|
|
|
|
|
|
|
use $package; |
36
|
|
|
|
|
|
|
USE |
37
|
|
|
|
|
|
|
|
38
|
4
|
|
|
2
|
|
383
|
eval $code; |
|
2
|
|
|
2
|
|
914
|
|
|
2
|
|
|
|
|
3568
|
|
|
2
|
|
|
|
|
58
|
|
|
2
|
|
|
|
|
845
|
|
|
2
|
|
|
|
|
522
|
|
|
2
|
|
|
|
|
31
|
|
39
|
4
|
|
|
|
|
20
|
$obj = $package->new( @args ); |
40
|
|
|
|
|
|
|
|
41
|
4
|
50
|
|
|
|
39
|
croak "There was an error loading: $@" if $@; |
42
|
|
|
|
|
|
|
|
43
|
4
|
|
|
|
|
18
|
$obj; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
'done'; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
__END__ |