| 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 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 21 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 21 | ▶ | use Carp; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 21 | ▶ | use HTML::Entities qw( encode_entities_numeric ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | 21 | our $VERSION = '0.0600'; | |||||||||
| 11 | |||||||||||
| 12 | |||||||||||
| 13 | ################################################################ | ||||||||||
| 14 | sub new | ||||||||||
| 15 | { | ||||||||||
| 16 | 25 | ▶ | my( $package, $text ) = @_; | ||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 17 | 25 | return bless { attributes => { value=>$text } }, $package; | |||||||||
| 18 | } | ||||||||||
| 19 | |||||||||||
| 20 | ################################################################ | ||||||||||
| 21 | 0 | ▶ | sub is_window { 0 } | ||||||||
|
Subroutine
is_window: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 22 | |||||||||||
| 23 | |||||||||||
| 24 | ################################################################ | ||||||||||
| 25 | sub nodeValue | ||||||||||
| 26 | { | ||||||||||
| 27 | 27 | ▶ | my( $self, $value ) = @_; | ||||||||
|
Subroutine
nodeValue: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||
| 28 | |||||||||||
| 29 | 27 | ▶ | if( 2==@_ ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 30 | 26 | ▶ | if( $POE::XUL::Node::CM ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 31 | 17 | $POE::XUL::Node::CM->after_set_attribute( $self, | |||||||||
| 32 | 'textnode', | ||||||||||
| 33 | $value ); | ||||||||||
| 34 | } | ||||||||||
| 35 | 26 | $_[0]->{attributes}{value} = $value; | |||||||||
| 36 | } | ||||||||||
| 37 | 27 | return $_[0]->{attributes}{value}; | |||||||||
| 38 | } | ||||||||||
| 39 | 21 | *value = \&nodeValue; | |||||||||
| 40 | |||||||||||
| 41 | ################################################################ | ||||||||||
| 42 | sub as_xml | ||||||||||
| 43 | { | ||||||||||
| 44 | encode_entities_numeric( $_[0]->{attributes}{value}, | ||||||||||
| 45 | 18 | ▶ | "\x00-\x1f<>&\'\x80-\xff" ); | ||||||||
|
Subroutine
as_xml: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 46 | } | ||||||||||
| 47 | |||||||||||
| 48 | ################################################################ | ||||||||||
| 49 | sub children | ||||||||||
| 50 | { | ||||||||||
| 51 | 43 | ▶ | return; | ||||||||
|
Subroutine
children: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 52 | } | ||||||||||
| 53 | |||||||||||
| 54 | ################################################################ | ||||||||||
| 55 | sub dispose | ||||||||||
| 56 | { | ||||||||||
| 57 | 6 | ▶ | return; | ||||||||
|
Subroutine
dispose: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 58 | } | ||||||||||
| 59 | |||||||||||
| 60 | ################################################################ | ||||||||||
| 61 | sub DESTROY | ||||||||||
| 62 | { | ||||||||||
| 63 | 19 | ▶ | my( $self ) = @_; | ||||||||
|
Subroutine
DESTROY: called CC=2 SCAR=6.9
| |||||||||||
| 64 | 19 | ▶ | $POE::XUL::Node::CM->after_destroy( $self ) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 65 | if $POE::XUL::Node::CM; | ||||||||||
| 66 | } | ||||||||||
| 67 | |||||||||||
| 68 | 21 | 1; | |||||||||
| 69 | |||||||||||
| 70 | __DATA__ | ||||||||||