| 1 | # object represents the open XML element for a stream | ||||||||||||||||||||
| 2 | package DJabberd::StreamStart; | ||||||||||||||||||||
| 3 | 20 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 20 | ▶ | use DJabberd::StreamVersion; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | |||||||||||||||||||||
| 6 | 883 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||
| 7 | 883 | my ($class, $saxdata) = @_; | |||||||||||||||||||
| 8 | 883 | return bless { | |||||||||||||||||||
| 9 | saxdata => $saxdata, | ||||||||||||||||||||
| 10 | }, $class; | ||||||||||||||||||||
| 11 | } | ||||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | 0 | ▶ | sub version { | ||||||||||||||||||
|
Subroutine
version: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||
| 14 | 0 | my $self = shift; | |||||||||||||||||||
| 15 | 0 | ▶ | return $self->{version} if $self->{version}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 16 | |||||||||||||||||||||
| 17 | 0 | my $ver; | |||||||||||||||||||
| 18 | |||||||||||||||||||||
| 19 | 0 | my $version_attr = $self->{saxdata}{Attributes}{"{}version"}; | |||||||||||||||||||
| 20 | 0 | ▶ | if ($version_attr) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 21 | 0 | $ver = DJabberd::StreamVersion->new($version_attr->{Value}); | |||||||||||||||||||
| 22 | } else { | ||||||||||||||||||||
| 23 | 0 | $ver = DJabberd::StreamVersion->none; | |||||||||||||||||||
| 24 | } | ||||||||||||||||||||
| 25 | |||||||||||||||||||||
| 26 | 0 | return $self->{version} = $ver; | |||||||||||||||||||
| 27 | } | ||||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | 0 | ▶ | sub announced_dialback { | ||||||||||||||||||
|
Subroutine
announced_dialback: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 30 | 0 | my $self = shift; | |||||||||||||||||||
| 31 | 0 | my $attr = $self->{saxdata}{Attributes}{"{http://www.w3.org/2000/xmlns/}db"}; | |||||||||||||||||||
| 32 | 0 | ▶ | return $attr && $attr->{Value} eq "jabber:server:dialback"; | ||||||||||||||||||
|
Condition0%0/3
$attr && $attr->{'Value'} eq 'jabber:server:dialback'
MC/DC0%0/2
$attr && $attr->{'Value'} eq 'jabber:server:dialback'
$attr
$attr->{'Value'} eq 'jabber:server:dialback'
Truth table0%0/3
A && B
A= $attrB= $attr->{'Value'} eq 'jabber:server:dialback'
| |||||||||||||||||||||
| 33 | } | ||||||||||||||||||||
| 34 | |||||||||||||||||||||
| 35 | 0 | ▶ | sub to { | ||||||||||||||||||
|
Subroutine
to: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 36 | 0 | my $self = shift; | |||||||||||||||||||
| 37 | 0 | ▶ | my $to_attr = $self->{saxdata}{Attributes}{"{}to"} or | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 38 | return ""; | ||||||||||||||||||||
| 39 | 0 | return $to_attr->{Value}; | |||||||||||||||||||
| 40 | } | ||||||||||||||||||||
| 41 | |||||||||||||||||||||
| 42 | 554 | ▶ | sub id { | ||||||||||||||||||
|
Subroutine
id: called CC=2 SCAR=7.1
Pod
undocumented
| |||||||||||||||||||||
| 43 | 554 | my $self = shift; | |||||||||||||||||||
| 44 | 554 | ▶ | my $attr = $self->{saxdata}{Attributes}{"{}id"} or | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 45 | return ""; | ||||||||||||||||||||
| 46 | 554 | return $attr->{Value}; | |||||||||||||||||||
| 47 | } | ||||||||||||||||||||
| 48 | |||||||||||||||||||||
| 49 | 0 | ▶ | sub xmlns { | ||||||||||||||||||
|
Subroutine
xmlns: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 50 | 0 | my $self = shift; | |||||||||||||||||||
| 51 | 0 | ▶ | my $attr = $self->{saxdata}{Attributes}{"{}xmlns"} or | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 52 | return ""; | ||||||||||||||||||||
| 53 | 0 | return $attr->{Value}; | |||||||||||||||||||
| 54 | } | ||||||||||||||||||||
| 55 | |||||||||||||||||||||
| 56 | 20 | 1; | |||||||||||||||||||