line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Acme::MetaSyntactic::Alias; |
2
|
2
|
|
|
2
|
|
2039
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
67
|
|
3
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
62
|
|
4
|
2
|
|
|
2
|
|
22
|
use Carp; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
301
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '1.000'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub init { |
9
|
1
|
|
|
1
|
1
|
83
|
my ( $self, $alias ) = @_; |
10
|
1
|
|
|
|
|
3
|
my $class = caller(0); |
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
|
|
80
|
eval "require Acme::MetaSyntactic::$alias;"; |
13
|
1
|
50
|
|
|
|
6
|
croak "Aliased theme Acme::MetaSyntactic::$alias failed to load: $@" |
14
|
|
|
|
|
|
|
if $@; |
15
|
|
|
|
|
|
|
|
16
|
2
|
|
|
2
|
|
10
|
no strict 'refs'; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
66
|
|
17
|
2
|
|
|
2
|
|
8
|
no warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
628
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
# copy almost everything over from the original |
20
|
1
|
|
|
|
|
2
|
for my $k ( grep { ! /^(?:Theme|meta|import)$/ } |
|
13
|
|
|
|
|
32
|
|
21
|
1
|
|
|
|
|
8
|
keys %{"Acme::MetaSyntactic::$alias\::"} ) |
22
|
|
|
|
|
|
|
{ |
23
|
10
|
|
|
|
|
7
|
*{"$class\::$k"} = *{"Acme::MetaSyntactic::$alias\::$k"}; |
|
10
|
|
|
|
|
55
|
|
|
10
|
|
|
|
|
27
|
|
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# local things |
27
|
1
|
|
|
|
|
5
|
${"$class\::Theme"} = ( split /::/, $class )[-1]; |
|
1
|
|
|
|
|
5
|
|
28
|
1
|
|
|
|
|
8
|
${"$class\::meta"} = $class->new(); |
|
1
|
|
|
|
|
7
|
|
29
|
1
|
|
|
|
|
7
|
*{"$class\::import"} = sub { |
30
|
1
|
|
|
1
|
|
14
|
my $callpkg = caller(0); |
31
|
1
|
|
|
|
|
1
|
my $theme = ${"$class\::Theme"}; |
|
1
|
|
|
|
|
5
|
|
32
|
1
|
|
|
|
|
5
|
my $meta = $class->new(); |
33
|
1
|
|
|
0
|
|
5
|
*{"$callpkg\::meta$theme"} = sub { $meta->name(@_) }; |
|
1
|
|
|
|
|
1692
|
|
|
0
|
|
|
|
|
|
|
34
|
1
|
|
|
|
|
4
|
}; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__END__ |