line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package slots; |
2
|
|
|
|
|
|
|
# ABSTRACT: A simple pragma for managing class slots. |
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
54248
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
21
|
|
5
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
16
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
355
|
use MOP (); |
|
1
|
|
|
|
|
35783
|
|
|
1
|
|
|
|
|
103
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
10
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:STEVAN'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub import { |
13
|
2
|
|
|
2
|
|
288
|
shift; |
14
|
2
|
|
|
|
|
4
|
my $pkg = caller(0); |
15
|
2
|
|
|
|
|
5
|
my $meta = MOP::Util::get_meta( $pkg ); |
16
|
2
|
|
|
|
|
269
|
my %slots = @_; |
17
|
|
|
|
|
|
|
|
18
|
2
|
|
|
|
|
10
|
$meta->add_slot( $_, $slots{ $_ } ) for keys %slots; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
MOP::Util::defer_until_UNITCHECK(sub { |
21
|
2
|
|
|
2
|
|
1285
|
MOP::Util::inherit_slots( MOP::Util::get_meta( $pkg ) ) |
22
|
2
|
|
|
|
|
363
|
}); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
__END__ |