line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Acme::Monta; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
50075
|
use strict; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
875
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
1
|
|
|
1
|
1
|
13
|
my $class = shift; |
10
|
1
|
|
|
|
|
6
|
my %args = @_; |
11
|
|
|
|
|
|
|
|
12
|
1
|
50
|
|
|
|
35
|
my $self = bless { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
13
|
|
|
|
|
|
|
_start => $args{start} ? $args{start} : '', |
14
|
|
|
|
|
|
|
_end => $args{end} ? $args{end} : '', |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
_open_font => $args{open_font} ? $args{open_font} : '#000', |
17
|
|
|
|
|
|
|
_open_back => $args{open_back} ? $args{open_back} : '#fff', |
18
|
|
|
|
|
|
|
_close_font => $args{close_font} ? $args{close_font} : '#000', |
19
|
|
|
|
|
|
|
_close_back => $args{close_back} ? $args{close_back} : '#000', |
20
|
|
|
|
|
|
|
_close_img => $args{close_img} ? 'url(' . $args{close_img} . ')' : '', |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
_replace_tag => $args{replace_tag} ? $args{replace_tag} : 'span', |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
_cursor => $args{cursor} ? $args{cursor} : 'pointer', |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
}, $class; |
27
|
|
|
|
|
|
|
|
28
|
1
|
|
|
|
|
5
|
return $self; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub montaize { |
32
|
1
|
|
|
1
|
1
|
7
|
my $self = shift; |
33
|
1
|
|
|
|
|
2
|
my $data = shift; |
34
|
|
|
|
|
|
|
|
35
|
1
|
|
|
|
|
40
|
$data =~ s|$self->{_start}(.*?)$self->{_end}| |
36
|
1
|
|
|
|
|
14
|
'<' . $self->{_replace_tag} . ' style="' . |
37
|
|
|
|
|
|
|
'cursor:' . $self->{_cursor} . ';' . |
38
|
|
|
|
|
|
|
'color:' . $self->{_close_font} . ';' . |
39
|
|
|
|
|
|
|
'background-color:' . $self->{_close_back} . ';' . |
40
|
|
|
|
|
|
|
'background-image:' . $self->{_close_img} . ';' . |
41
|
|
|
|
|
|
|
'" onClick="' . |
42
|
|
|
|
|
|
|
'this.style.color = \'' . $self->{_open_font} . '\';' . |
43
|
|
|
|
|
|
|
'this.style.backgroundColor = \'' . $self->{_open_back} . '\';' . |
44
|
|
|
|
|
|
|
'this.style.backgroundImage = \'\';' . |
45
|
|
|
|
|
|
|
'this.style.cursor = \'\';' . |
46
|
|
|
|
|
|
|
'">' . $1 . '' . $self->{_replace_tag} . '>' |
47
|
|
|
|
|
|
|
|goie; |
48
|
|
|
|
|
|
|
|
49
|
1
|
|
|
|
|
11
|
return $data; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |
53
|
|
|
|
|
|
|
__END__ |