line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package POE::XUL::TextNode; |
2
|
|
|
|
|
|
|
# $Id: TextNode.pm 1566 2010-11-03 03:13:32Z fil $ |
3
|
|
|
|
|
|
|
# Copyright Philip Gwyn 2007-2010. All rights reserved. |
4
|
|
|
|
|
|
|
|
5
|
21
|
|
|
21
|
|
68
|
use strict; |
|
21
|
|
|
|
|
20
|
|
|
21
|
|
|
|
|
483
|
|
6
|
21
|
|
|
21
|
|
60
|
use warnings; |
|
21
|
|
|
|
|
18
|
|
|
21
|
|
|
|
|
389
|
|
7
|
21
|
|
|
21
|
|
60
|
use Carp; |
|
21
|
|
|
|
|
20
|
|
|
21
|
|
|
|
|
955
|
|
8
|
21
|
|
|
21
|
|
3706
|
use HTML::Entities qw( encode_entities_numeric ); |
|
21
|
|
|
|
|
37497
|
|
|
21
|
|
|
|
|
5415
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '0.0601'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
################################################################ |
14
|
|
|
|
|
|
|
sub new |
15
|
|
|
|
|
|
|
{ |
16
|
22
|
|
|
22
|
1
|
495
|
my( $package, $text ) = @_; |
17
|
22
|
|
|
|
|
71
|
return bless { attributes => { value=>$text } }, $package; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
################################################################ |
21
|
0
|
|
|
0
|
0
|
0
|
sub is_window { 0 } |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
################################################################ |
25
|
|
|
|
|
|
|
sub nodeValue |
26
|
|
|
|
|
|
|
{ |
27
|
24
|
|
|
24
|
1
|
23
|
my( $self, $value ) = @_; |
28
|
|
|
|
|
|
|
|
29
|
24
|
100
|
|
|
|
50
|
if( 2==@_ ) { |
30
|
23
|
100
|
|
|
|
40
|
if( $POE::XUL::Node::CM ) { |
31
|
14
|
|
|
|
|
30
|
$POE::XUL::Node::CM->after_set_attribute( $self, |
32
|
|
|
|
|
|
|
'textnode', |
33
|
|
|
|
|
|
|
$value ); |
34
|
|
|
|
|
|
|
} |
35
|
23
|
|
|
|
|
31
|
$_[0]->{attributes}{value} = $value; |
36
|
|
|
|
|
|
|
} |
37
|
24
|
|
|
|
|
39
|
return $_[0]->{attributes}{value}; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
*value = \&nodeValue; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
################################################################ |
42
|
|
|
|
|
|
|
sub as_xml |
43
|
|
|
|
|
|
|
{ |
44
|
|
|
|
|
|
|
encode_entities_numeric( $_[0]->{attributes}{value}, |
45
|
18
|
|
|
18
|
1
|
42
|
"\x00-\x1f<>&\'\x80-\xff" ); |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
################################################################ |
49
|
|
|
|
|
|
|
sub children |
50
|
|
|
|
|
|
|
{ |
51
|
42
|
|
|
42
|
1
|
64
|
return; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
################################################################ |
55
|
|
|
|
|
|
|
sub dispose |
56
|
|
|
|
|
|
|
{ |
57
|
3
|
|
|
3
|
1
|
6
|
return; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
################################################################ |
61
|
|
|
|
|
|
|
sub DESTROY |
62
|
|
|
|
|
|
|
{ |
63
|
16
|
|
|
16
|
|
14
|
my( $self ) = @_; |
64
|
16
|
100
|
|
|
|
62
|
$POE::XUL::Node::CM->after_destroy( $self ) |
65
|
|
|
|
|
|
|
if $POE::XUL::Node::CM; |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
1; |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
__DATA__ |