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