line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Attribute::Util; |
2
|
|
|
|
|
|
|
|
3
|
5
|
|
|
5
|
|
65354
|
use warnings; |
|
5
|
|
|
|
|
12
|
|
|
5
|
|
|
|
|
172
|
|
4
|
5
|
|
|
5
|
|
27
|
use strict; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
161
|
|
5
|
5
|
|
|
5
|
|
5367
|
use Attribute::Handlers; |
|
5
|
|
|
|
|
30576
|
|
|
5
|
|
|
|
|
34
|
|
6
|
5
|
|
|
5
|
|
188
|
use Carp (); |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
817
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = sprintf "%d.%02d", q$Revision: 1.7 $ =~ /(\d+)/g; |
9
|
|
|
|
|
|
|
our @DEFAULT_ATTRIBUTES = qw(Abstract Alias Memoize Method SigHandler); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub import{ |
12
|
5
|
|
|
5
|
|
46
|
my $pkg = shift; |
13
|
5
|
100
|
|
|
|
31
|
my @attrs = @_ ? @_ : @DEFAULT_ATTRIBUTES; |
14
|
5
|
|
|
|
|
16
|
for my $attr (@attrs){ |
15
|
21
|
|
|
|
|
1471
|
eval qq{ require Attribute::$attr; }; |
16
|
21
|
50
|
|
|
|
1163
|
$@ and Carp::croak $@; |
17
|
|
|
|
|
|
|
# import is not neccessary for Attribute modules. |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
"Rosebud"; # for MARCEL's sake, not 1 -- dankogai |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
__END__ |