line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Inline::Echo; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
$VERSION = '0.01'; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
require Inline; |
6
|
|
|
|
|
|
|
require Inline::Interp; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
@ISA = qw(Inline Inline::Interp); |
9
|
|
|
|
|
|
|
|
10
|
2
|
|
|
2
|
|
11694
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
75
|
|
11
|
2
|
|
|
2
|
|
11
|
use Carp; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
617
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub register { |
14
|
|
|
|
|
|
|
return { |
15
|
0
|
|
|
0
|
1
|
0
|
language => 'Echo', |
16
|
|
|
|
|
|
|
aliases => ['Echo', 'echo'], |
17
|
|
|
|
|
|
|
type => 'interpreted', |
18
|
|
|
|
|
|
|
suffix => 'echo', |
19
|
|
|
|
|
|
|
}; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub do_load { |
23
|
1
|
|
|
1
|
1
|
2
|
my ($funcs, $code) = @_; |
24
|
|
|
|
|
|
|
|
25
|
1
|
|
|
|
|
9
|
while($code =~ m/function(\s+)([a-z0-9_]+)(\s*){(.*?)}/isg){ |
26
|
1
|
|
|
|
|
6
|
Inline::Interp::add_func($funcs, $2, $4); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub load { |
31
|
2
|
|
|
2
|
1
|
5224
|
Inline::Interp::load(@_); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub do_run { |
35
|
3
|
|
|
3
|
1
|
6
|
my ($code, $io) = @_; |
36
|
|
|
|
|
|
|
|
37
|
3
|
|
|
|
|
22
|
Inline::Interp::output_char($io, $_) for split //, $code; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
__END__ |