line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Class::StateMachine::Declarative; |
2
|
|
|
|
|
|
|
|
3
|
0
|
|
|
0
|
|
0
|
sub _clean_eval { eval shift } |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
24373
|
use 5.010; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
60
|
|
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
52
|
|
10
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
13
|
|
|
1
|
|
|
|
|
33
|
|
11
|
1
|
|
|
1
|
|
6
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
136
|
|
12
|
1
|
|
|
1
|
|
30
|
BEGIN { our @CARP_NOT = qw(Class::StateMachine Class::StateMachine::Private) } |
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
|
798
|
use Class::StateMachine::Declarative::Builder; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
205
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
my $dump = exists $ENV{CLASS_STATEMACHINE_DECLARATIVE_DUMPFILE}; |
17
|
|
|
|
|
|
|
my %dump; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
END { |
20
|
1
|
50
|
|
1
|
|
11
|
if ($dump) { |
21
|
0
|
0
|
|
|
|
0
|
open my $fh, ">", $ENV{CLASS_STATEMACHINE_DECLARATIVE_DUMPFILE} or return; |
22
|
0
|
|
|
|
|
0
|
require Data::Dumper; |
23
|
0
|
|
|
|
|
0
|
print $fh Data::Dumper->Dump([\%dump], [qw(*state_machines)]); |
24
|
0
|
|
|
|
|
0
|
close $fh; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub import { |
29
|
1
|
|
|
1
|
|
14
|
shift; |
30
|
1
|
|
|
|
|
3
|
my $class = scalar(caller); |
31
|
1
|
50
|
|
|
|
6
|
$dump{$class} = [ @_ ] if $dump; |
32
|
1
|
|
|
|
|
7
|
my $builder = Class::StateMachine::Declarative::Builder->new($class); |
33
|
1
|
|
|
|
|
4
|
$builder->parse_state_declarations(@_); |
34
|
1
|
|
|
|
|
4
|
$builder->generate_class; |
35
|
|
|
|
|
|
|
#use Data::Dumper; |
36
|
|
|
|
|
|
|
#print STDERR Dumper($builder); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
__END__ |