line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
5
|
|
|
5
|
|
1339283
|
use 5.010001; |
|
5
|
|
|
|
|
61
|
|
2
|
5
|
|
|
5
|
|
27
|
use strict; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
103
|
|
3
|
5
|
|
|
5
|
|
25
|
use warnings; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
265
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Story::Interact; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:TOBYINK'; |
8
|
|
|
|
|
|
|
our $VERSION = '0.001013'; |
9
|
|
|
|
|
|
|
|
10
|
5
|
|
|
5
|
|
2096
|
use Story::Interact::Analyze (); |
|
5
|
|
|
|
|
20
|
|
|
5
|
|
|
|
|
157
|
|
11
|
5
|
|
|
5
|
|
37
|
use Story::Interact::Character (); |
|
5
|
|
|
|
|
12
|
|
|
5
|
|
|
|
|
95
|
|
12
|
5
|
|
|
5
|
|
2945
|
use Story::Interact::Harness::Terminal (); |
|
5
|
|
|
|
|
37
|
|
|
5
|
|
|
|
|
369
|
|
13
|
5
|
|
|
5
|
|
3133
|
use Story::Interact::Page (); |
|
5
|
|
|
|
|
22
|
|
|
5
|
|
|
|
|
177
|
|
14
|
5
|
|
|
5
|
|
2378
|
use Story::Interact::PageSource (); |
|
5
|
|
|
|
|
22
|
|
|
5
|
|
|
|
|
158
|
|
15
|
5
|
|
|
5
|
|
2515
|
use Story::Interact::PageSource::DBI (); |
|
5
|
|
|
|
|
20
|
|
|
5
|
|
|
|
|
155
|
|
16
|
5
|
|
|
5
|
|
2693
|
use Story::Interact::PageSource::Dir (); |
|
5
|
|
|
|
|
21
|
|
|
5
|
|
|
|
|
237
|
|
17
|
5
|
|
|
5
|
|
3069
|
use Story::Interact::PageSource::Waterfall (); |
|
5
|
|
|
|
|
18
|
|
|
5
|
|
|
|
|
169
|
|
18
|
5
|
|
|
5
|
|
40
|
use Story::Interact::State (); |
|
5
|
|
|
|
|
12
|
|
|
5
|
|
|
|
|
92
|
|
19
|
5
|
|
|
5
|
|
27
|
use Story::Interact::Syntax (); |
|
5
|
|
|
|
|
15
|
|
|
5
|
|
|
|
|
1130
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub new_page_source { |
22
|
4
|
|
|
4
|
0
|
86839
|
my ( undef, $story ) = @_; |
23
|
|
|
|
|
|
|
|
24
|
4
|
100
|
|
|
|
131
|
if ( -d $story ) { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
25
|
2
|
|
|
|
|
63
|
return Story::Interact::PageSource::Dir->new( dir => $story ); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
elsif ( $story =~ /^dbi:/i ) { |
28
|
0
|
|
|
|
|
0
|
require DBI; |
29
|
0
|
|
|
|
|
0
|
my $dbh = DBI->connect( $story, undef, undef ); |
30
|
0
|
|
|
|
|
0
|
return Story::Interact::PageSource::DBI->new( dbh => $dbh ); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
elsif ( -f $story ) { |
33
|
2
|
|
|
|
|
1874
|
require DBI; |
34
|
2
|
|
|
|
|
19276
|
my $dbh = DBI->connect( "dbi:SQLite:dbname=$story", '', '' ); |
35
|
2
|
|
|
|
|
13600
|
return Story::Interact::PageSource::DBI->new( dbh => $dbh ); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
require Carp; |
39
|
0
|
|
|
|
|
|
Carp::croak("Could not open '$story' as a page source"); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
__END__ |