Changeset 7869e48 for perl/modules/Jabber/lib/XML
- Timestamp:
- Jan 12, 2013, 1:43:13 PM (12 years ago)
- Children:
- e3a0d71, 4485285
- Parents:
- 4626016
- git-author:
- Jason Gross <jgross@mit.edu> (01/12/13 13:13:18)
- git-committer:
- Jason Gross <jgross@mit.edu> (01/12/13 13:43:13)
- Location:
- perl/modules/Jabber/lib/XML
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/modules/Jabber/lib/XML/Stream.pm
ra8d5a39 r7869e48 317 317 318 318 my $lc = lc($module); 319 319 320 320 eval("\$HANDLERS{\$lc}->{startElement} = \\&XML::Stream::${module}::_handle_element;"); 321 321 eval("\$HANDLERS{\$lc}->{endElement} = \\&XML::Stream::${module}::_handle_close;"); … … 600 600 601 601 my $root = $self->GetRoot($sid); 602 602 603 603 if ($root->{xmlns} ne $self->{SIDS}->{$serverid}->{namespace}) 604 604 { … … 668 668 } 669 669 while($#_ >= 0) { $self->{SIDS}->{newconnection}->{ lc pop(@_) } = pop(@_); } 670 670 671 671 my $timeout = exists($self->{SIDS}->{newconnection}->{timeout}) ? 672 672 delete($self->{SIDS}->{newconnection}->{timeout}) : … … 674 674 675 675 $self->debug(4,"Connect: timeout($timeout)"); 676 676 677 677 678 678 if (exists($self->{SIDS}->{newconnection}->{srv})) … … 683 683 my $res = Net::DNS::Resolver->new(); 684 684 my $query = $res->query($self->{SIDS}->{newconnection}->{srv}.".".$self->{SIDS}->{newconnection}->{hostname},"SRV"); 685 685 686 686 if ($query) 687 { 687 { 688 688 $self->{SIDS}->{newconnection}->{hostname} = ($query->answer)[0]->target(); 689 689 $self->{SIDS}->{newconnection}->{port} = ($query->answer)[0]->port(); … … 771 771 $self->{SIDS}->{newconnection}->{sock} = 772 772 new FileHandle(">&STDOUT"); 773 } 773 } 774 774 775 775 #--------------------------------------------------------------------------- … … 1030 1030 #--------------------------------------------------------------------------- 1031 1031 my %stream_args; 1032 1032 1033 1033 if (($self->{SIDS}->{$currsid}->{connectiontype} eq "tcpip") || 1034 1034 ($self->{SIDS}->{$currsid}->{connectiontype} eq "http")) … … 1036 1036 $stream_args{to}= $self->{SIDS}->{$currsid}->{hostname} 1037 1037 unless exists($self->{SIDS}->{$currsid}->{to}); 1038 1038 1039 1039 $stream_args{to} = $self->{SIDS}->{$currsid}->{to} 1040 1040 if exists($self->{SIDS}->{$currsid}->{to}); … … 1044 1044 ($self->{SIDS}->{$currsid}->{myhostname} ne "") 1045 1045 ); 1046 1046 1047 1047 $stream_args{from} = $self->{SIDS}->{$currsid}->{from} 1048 1048 if exists($self->{SIDS}->{$currsid}->{from}); 1049 1049 1050 1050 $stream_args{id} = $self->{SIDS}->{$currsid}->{id} 1051 1051 if (exists($self->{SIDS}->{$currsid}->{id}) && … … 1055 1055 $stream_args{namespaces} = $self->{SIDS}->{$currsid}->{namespaces}; 1056 1056 } 1057 1057 1058 1058 my $stream = 1059 1059 $self->StreamHeader( … … 1172 1172 } 1173 1173 } 1174 1174 1175 1175 return $self->GetRoot($sid); 1176 1176 } … … 1333 1333 #--------------------------------------------------------------------------- 1334 1334 $self->{SIDS}->{$sid}->{streamfeatures}->{received} = 0; 1335 1335 1336 1336 #--------------------------------------------------------------------------- 1337 1337 # First acitivty is the connection... duh. =) … … 1522 1522 $self->debug(4,"Process: sid($sid) time(",time,") timeout(undef)"); 1523 1523 } 1524 1524 1525 1525 $self->Respond($sid) 1526 1526 if (exists($self->{SIDS}->{$sid}->{activitytimeout}) && … … 1637 1637 $self->debug(3,"Send: sid($sid)"); 1638 1638 $self->debug(3,"Send: status($self->{SIDS}->{$sid}->{status})"); 1639 1639 1640 1640 $self->{SIDS}->{$sid}->{keepalive} = time; 1641 1641 … … 1677 1677 return; 1678 1678 } 1679 1679 1680 1680 $self->debug(4,"Send: SENDWRITTEN($self->{SENDWRITTEN})"); 1681 1681 … … 1736 1736 } 1737 1737 } 1738 1738 1739 1739 #------------------------------------------------------------------------- 1740 1740 # XMPP-TLS - 1.0 … … 1753 1753 } 1754 1754 } 1755 1755 1756 1756 #------------------------------------------------------------------------- 1757 1757 # XMPP-Bind - 1.0 … … 1762 1762 $self->{SIDS}->{$sid}->{streamfeatures}->{'xmpp-bind'} = 1; 1763 1763 } 1764 1764 1765 1765 #------------------------------------------------------------------------- 1766 1766 # XMPP-Session - 1.0 … … 1771 1771 $self->{SIDS}->{$sid}->{streamfeatures}->{'xmpp-session'} = 1; 1772 1772 } 1773 1773 1774 1774 } 1775 1775 … … 1833 1833 $self->TLSClientFailure($sid,$node); 1834 1834 } 1835 1835 1836 1836 if ($tag eq "proceed") 1837 1837 { … … 1853 1853 $timeout = 120 unless defined($timeout); 1854 1854 $timeout = 120 if ($timeout eq ""); 1855 1855 1856 1856 $self->TLSStartTLS($sid); 1857 1857 … … 1904 1904 return; 1905 1905 } 1906 1906 1907 1907 IO::Socket::SSL->start_SSL($self->{SIDS}->{$sid}->{sock},{SSL_verify_mode=>0x00}); 1908 1908 … … 1910 1910 $self->debug(1,"TLSClientProceed: SSL: We are secure") 1911 1911 if ($self->{SIDS}->{$sid}->{sock}); 1912 1912 1913 1913 $self->{SIDS}->{$sid}->{tls}->{done} = 1; 1914 1914 $self->{SIDS}->{$sid}->{tls}->{secure} = 1; … … 1925 1925 my $self = shift; 1926 1926 my $sid = shift; 1927 1927 1928 1928 return $self->{SIDS}->{$sid}->{tls}->{secure}; 1929 1929 } … … 1939 1939 my $self = shift; 1940 1940 my $sid = shift; 1941 1941 1942 1942 return $self->{SIDS}->{$sid}->{tls}->{done}; 1943 1943 } … … 1953 1953 my $self = shift; 1954 1954 my $sid = shift; 1955 1955 1956 1956 return $self->{SIDS}->{$sid}->{tls}->{error}; 1957 1957 } … … 1968 1968 my $sid = shift; 1969 1969 my $node = shift; 1970 1970 1971 1971 my $type = &XPath($node,"*/name()"); 1972 1972 … … 1986 1986 my $sid = shift; 1987 1987 my $type = shift; 1988 1988 1989 1989 $self->Send($sid,"<failure xmlns='".&ConstXMLNS('xmpp-tls')."'><${type}/></failure>"); 1990 1990 } … … 2018 2018 $self->SASLAnswerChallenge($sid,$node); 2019 2019 } 2020 2020 2021 2021 if ($tag eq "failure") 2022 2022 { 2023 2023 $self->SASLClientFailure($sid,$node); 2024 2024 } 2025 2025 2026 2026 if ($tag eq "success") 2027 2027 { … … 2045 2045 my $challenge64 = &XPath($node,"text()"); 2046 2046 my $challenge = MIME::Base64::decode_base64($challenge64); 2047 2047 2048 2048 #------------------------------------------------------------------------- 2049 2049 # As far as I can tell, if the challenge contains rspauth, then we authed. … … 2112 2112 2113 2113 return unless defined($mechanisms); 2114 2114 2115 2115 my $sasl = new Authen::SASL(mechanism=>join(" ",@{$mechanisms}), 2116 2116 callback=>{ … … 2140 2140 my $self = shift; 2141 2141 my $sid = shift; 2142 2142 2143 2143 return $self->{SIDS}->{$sid}->{sasl}->{authed}; 2144 2144 } … … 2154 2154 my $self = shift; 2155 2155 my $sid = shift; 2156 2156 2157 2157 return $self->{SIDS}->{$sid}->{sasl}->{done}; 2158 2158 } … … 2168 2168 my $self = shift; 2169 2169 my $sid = shift; 2170 2170 2171 2171 return $self->{SIDS}->{$sid}->{sasl}->{error}; 2172 2172 } … … 2183 2183 my $sid = shift; 2184 2184 my $node = shift; 2185 2185 2186 2186 my $type = &XPath($node,"*/name()"); 2187 2187 … … 2201 2201 my $sid = shift; 2202 2202 my $node = shift; 2203 2203 2204 2204 $self->{SIDS}->{$sid}->{sasl}->{authed} = 1; 2205 2205 $self->{SIDS}->{$sid}->{sasl}->{done} = 1; … … 2217 2217 my $sid = shift; 2218 2218 my $type = shift; 2219 2219 2220 2220 $self->Send($sid,"<failure xmlns='".&ConstXMLNS('xmpp-sasl')."'><${type}/></failure>"); 2221 2221 } … … 2292 2292 # Make sure we are receiving a valid stream on the same namespace. 2293 2293 #--------------------------------------------------------------------- 2294 2294 2295 2295 $self->debug(3,"_handle_root: ($self->{SIDS}->{$self->{SIDS}->{$sid}->{serverid}}->{namespace})"); 2296 2296 $self->{SIDS}->{$sid}->{status} = … … 2328 2328 } 2329 2329 } 2330 2330 2331 2331 #------------------------------------------------------------------------- 2332 2332 # Sometimes we will get an error, so let's parse the tag assuming that we … … 2335 2335 my $stream_prefix = $self->StreamPrefix($sid); 2336 2336 $self->debug(5,"_handle_root: stream_prefix($stream_prefix)"); 2337 2337 2338 2338 if ($tag eq $stream_prefix.":error") 2339 2339 { … … 2441 2441 $self->{SIDS}->{$sid}->{streamerror}->{type} = "unknown"; 2442 2442 $self->{SIDS}->{$sid}->{streamerror}->{node} = $node; 2443 2443 2444 2444 #------------------------------------------------------------------------- 2445 2445 # Check for older 0.9 streams and handle the errors for them. … … 2676 2676 my $tree = shift; 2677 2677 my $path = shift; 2678 2678 2679 2679 my $query = new XML::Stream::XPath::Query($path); 2680 2680 my $result = $query->execute($tree); … … 2683 2683 my %attribs = $result->getAttribs(); 2684 2684 return %attribs if (scalar(keys(%attribs)) > 0); 2685 2685 2686 2686 my @values = $result->getValues(); 2687 2687 @values = $result->getList() unless ($#values > -1); … … 2703 2703 my $tree = shift; 2704 2704 my $path = shift; 2705 2705 2706 2706 my $query = new XML::Stream::XPath::Query($path); 2707 2707 my $result = $query->execute($tree); … … 2891 2891 { 2892 2892 my $const = shift; 2893 2893 2894 2894 return $XMLNS{$const}; 2895 2895 } … … 2905 2905 my $self = shift; 2906 2906 my $sid = shift; 2907 2907 2908 2908 return $self->ns2prefix($sid,&ConstXMLNS("stream")); 2909 2909 } … … 2991 2991 2992 2992 $self->debug(1,"LoadSSL: Load the IO::Socket::SSL module"); 2993 2993 2994 2994 if (defined($SSL) && ($SSL == 1)) 2995 2995 { … … 2997 2997 return 1; 2998 2998 } 2999 2999 3000 3000 if (defined($SSL) && ($SSL == 0)) 3001 3001 { … … 3106 3106 $stream .= " ".$ns->GetStream(); 3107 3107 } 3108 3108 3109 3109 $stream .= ">"; 3110 3110 -
perl/modules/Jabber/lib/XML/Stream/Namespace.pm
rc2bed55 r7869e48 25 25 =head1 NAME 26 26 27 XML::Stream::Namespace - Object to make defining Namespaces easier in 27 XML::Stream::Namespace - Object to make defining Namespaces easier in 28 28 XML::Stream. 29 29 … … 49 49 GetAttributes() returns a hash ( attrib1=>"value1",attrib2=>"value2") 50 50 GetStream() returns the following string: 51 "xmlns:mynamespace='http://www.nynamespace.com/xmlns' 52 mynamespace:attrib1='value1' 51 "xmlns:mynamespace='http://www.nynamespace.com/xmlns' 52 mynamespace:attrib1='value1' 53 53 mynamespace:attrib2='value2'" 54 54 … … 71 71 # of the stream to foo.bar.org:1234... 72 72 # 73 # <stream:stream 73 # <stream:stream 74 74 # xmlns:stream="http://etherx.jabber.org/streams" 75 75 # to="foo.bar.org" 76 # xmlns="foo:bar" 76 # xmlns="foo:bar" 77 77 # xmlns:mynamespace="http://www.mynamespace.org/xmlns" 78 78 # mynamespace:foo="bar" 79 79 # mynamespace:bob="vila"> 80 80 # 81 81 82 82 83 83 =head1 AUTHOR … … 183 183 $string .= "='".$self->GetAttributes($attrib)."'"; 184 184 } 185 185 186 186 return $string; 187 187 } -
perl/modules/Jabber/lib/XML/Stream/Node.pm
rc2bed55 r7869e48 85 85 86 86 remove_child(node) - removes the child node from the current node. 87 87 88 88 remove_cdata() - removes all of the cdata children from the current node. 89 89 … … 120 120 121 121 XPath(path) - run XML::Stream::XPath on this node. 122 122 123 123 XPathCheck(path) - run XML::Stream::XPath on this node and return 1 or 0 124 124 to see if it matches or not. … … 266 266 267 267 return $cdata; 268 } 268 } 269 269 270 270 … … 286 286 splice(@{$self->{CHILDREN}},$index,1); 287 287 } 288 } 288 } 289 289 290 290 … … 294 294 return () unless exists($self->{ATTRIBS}); 295 295 return %{$self->{ATTRIBS}}; 296 } 296 } 297 297 298 298 … … 308 308 309 309 sub put_attrib 310 { 310 { 311 311 my $self = shift; 312 312 my (%att) = @_; … … 366 366 my ($tag) = @_; 367 367 368 $self->{TAG} = $tag; 368 $self->{TAG} = $tag; 369 369 } 370 370 … … 513 513 514 514 $self->debug(2,"Node: _handle_close: check2(",$#{$self->{SIDS}->{$sid}->{node}},")"); 515 515 516 516 if($#{$self->{SIDS}->{$sid}->{node}} == -1) 517 517 { … … 521 521 { 522 522 my $stream_prefix = $self->StreamPrefix($sid); 523 523 524 524 if(defined($self->{SIDS}->{$sid}->{node}->[0]) && 525 525 ($self->{SIDS}->{$sid}->{node}->[0]->get_tag() =~ /^${stream_prefix}\:/)) … … 542 542 { 543 543 my $xmlns = $node->get_attrib("xmlns"); 544 544 545 545 $self->ProcessSASLPacket($sid,$node) 546 546 if ($xmlns eq &XML::Stream::ConstXMLNS("xmpp-sasl")); -
perl/modules/Jabber/lib/XML/Stream/Parser.pm
rc2bed55 r7869e48 324 324 $self->{CNAME}->[$self->{CURR}] = $name; 325 325 } 326 326 327 327 $self->{XML} = substr($self->{XML},$close+1,length($self->{XML})-$close-1); 328 328 next; … … 337 337 return $self->returnData(0); 338 338 } 339 339 340 340 &{$self->{HANDLER}->{characters}}($self,substr($self->{XML},9,$cdataclose-9)); 341 341 342 342 $self->{XML} = substr($self->{XML},$cdataclose+3,length($self->{XML})-$cdataclose-3); 343 343 next; … … 510 510 return unless ($self->{DOC} == 1); 511 511 512 if ($self->{STYLE} eq "debug") 512 if ($self->{STYLE} eq "debug") 513 513 { 514 514 my $str = $cdata; … … 530 530 push @{$self->{TREE}[$#{$self->{TREE}}]}, 0; 531 531 push @{$self->{TREE}[$#{$self->{TREE}}]}, $cdata; 532 } 532 } 533 533 } 534 534 } -
perl/modules/Jabber/lib/XML/Stream/Tree.pm
rc2bed55 r7869e48 142 142 push @{$self->{SIDS}->{$sid}->{tree}[$#{$self->{SIDS}->{$sid}->{tree}}]}, 0; 143 143 push @{$self->{SIDS}->{$sid}->{tree}[$#{$self->{SIDS}->{$sid}->{tree}}]}, $cdata; 144 } 144 } 145 145 } 146 146 … … 187 187 if(defined($self->{SIDS}->{$sid}->{tree}->[0]) && 188 188 ($self->{SIDS}->{$sid}->{tree}->[0] =~ /^${stream_prefix}\:/)) 189 { 189 { 190 190 my @tree = @{$self->{SIDS}->{$sid}->{tree}}; 191 191 $self->{SIDS}->{$sid}->{tree} = []; … … 196 196 my @tree = @{$self->{SIDS}->{$sid}->{tree}}; 197 197 $self->{SIDS}->{$sid}->{tree} = []; 198 198 199 199 my @special = 200 200 &XML::Stream::XPath( … … 384 384 return 1; 385 385 } 386 386 387 387 #--------------------------------------------------------------------- 388 388 # Return the raw CDATA value without mark ups, or the value of the … … 592 592 593 593 my $str = ""; 594 if (ref($parseTree->[0]) eq "") 594 if (ref($parseTree->[0]) eq "") 595 595 { 596 596 if ($parseTree->[0] eq "0") … … 608 608 { 609 609 $str .= ">"; 610 610 611 611 my $index = 1; 612 612 while($index <= $#{$parseTree->[1]}) … … 616 616 $index += 2; 617 617 } 618 618 619 619 $str .= $rawXML if defined($rawXML); 620 620 $str .= "</".$parseTree->[0].">"; -
perl/modules/Jabber/lib/XML/Stream/XPath/Op.pm
rc2bed55 r7869e48 50 50 $self->{TYPE} = shift; 51 51 $self->{VALUE} = shift; 52 52 53 53 return $self; 54 54 } … … 165 165 { 166 166 push(@valid_elems,$elem); 167 } 168 } 169 170 $$ctxt->setList(@valid_elems); 171 167 } 168 } 169 170 $$ctxt->setList(@valid_elems); 171 172 172 if ($#valid_elems == -1) 173 173 { … … 224 224 225 225 my @valid_elems; 226 226 227 227 foreach my $elem (@elems) 228 228 { 229 229 push(@valid_elems,$self->descend($elem)); 230 230 } 231 231 232 232 $$ctxt->setList(@valid_elems); 233 233 … … 247 247 248 248 my @valid_elems; 249 249 250 250 if (($self->{VALUE} eq "*") || (&XML::Stream::GetXMLData("tag",$elem) eq $self->{VALUE})) 251 251 { 252 252 push(@valid_elems,$elem); 253 253 } 254 254 255 255 foreach my $child (&XML::Stream::GetXMLData("child array",$elem,"*")) 256 256 { 257 257 push(@valid_elems,$self->descend($child)); 258 258 } 259 259 260 260 return @valid_elems; 261 261 } … … 326 326 } 327 327 } 328 328 329 329 $$ctxt->setList(@valid_elems); 330 330 … … 343 343 my $elem = shift; 344 344 return &XML::Stream::GetXMLData("value",$elem); 345 } 345 } 346 346 347 347 … … 374 374 $tmp_ctxt->setList($$ctxt->getList()); 375 375 $tmp_ctxt->in_context(0); 376 376 377 377 if (!$self->{OP_L}->isValid(\$tmp_ctxt) || !$self->{OP_R}->isValid(\$tmp_ctxt)) 378 378 { … … 393 393 @valid_elems = $$ctxt->getList(); 394 394 } 395 395 396 396 $$ctxt->setList(@valid_elems); 397 397 … … 414 414 print $space," op_l: "; 415 415 $self->{OP_L}->display($space." "); 416 416 417 417 print $space," op_r: "; 418 418 $self->{OP_R}->display($space." "); … … 449 449 $tmp_ctxt->setList($$ctxt->getList()); 450 450 $tmp_ctxt->in_context(0); 451 451 452 452 if (!$self->{OP_L}->isValid(\$tmp_ctxt) || !$self->{OP_R}->isValid(\$tmp_ctxt)) 453 453 { … … 468 468 @valid_elems = $$ctxt->getList(); 469 469 } 470 470 471 471 $$ctxt->setList(@valid_elems); 472 472 … … 489 489 print $space," op_l: "; 490 490 $self->{OP_L}->display($space." "); 491 491 492 492 print $space," op_r: "; 493 493 $self->{OP_R}->display($space." "); … … 524 524 my @values; 525 525 my %attribs; 526 526 527 527 foreach my $elem (@elems) 528 528 { … … 558 558 return; 559 559 } 560 560 561 561 return 1; 562 562 } … … 607 607 my $opl = $self->{OP_L}->isValid($ctxt); 608 608 my $opr = $self->{OP_R}->isValid($ctxt); 609 609 610 610 if ($opl && $opr) 611 611 { … … 628 628 print $space," op_l: \n"; 629 629 $self->{OP_L}->display($space." "); 630 630 631 631 print $space," op_r: \n"; 632 632 $self->{OP_R}->display($space." "); … … 672 672 my $opl = $self->{OP_L}->isValid(\$tmp_ctxt_l); 673 673 my $opr = $self->{OP_R}->isValid(\$tmp_ctxt_r); 674 674 675 675 if ($opl || $opr) 676 676 { 677 677 push(@valid_elems,$elem); 678 } 679 } 680 681 $$ctxt->setList(@valid_elems); 682 678 } 679 } 680 681 $$ctxt->setList(@valid_elems); 682 683 683 if ($#valid_elems == -1) 684 684 { … … 699 699 print "$space op_l: "; 700 700 $self->{OP_L}->display("$space "); 701 701 702 702 print "$space op_r: "; 703 703 $self->{OP_R}->display("$space "); … … 750 750 my $self = shift; 751 751 my $elem = shift; 752 752 753 753 my $result; 754 754 eval("\$result = &{\$XML::Stream::XPath::VALUES{\$self->{VALUE}}}(\$elem);"); … … 790 790 push(@valid_elems,$elem); 791 791 push(@valid_values,$text); 792 } 792 } 793 793 } 794 794 795 795 $$ctxt->setList(@valid_elems); 796 796 $$ctxt->setValues(@valid_values); 797 797 798 798 if ($#valid_elems == -1) 799 799 { … … 819 819 { 820 820 push(@valid_elems,$elem); 821 } 822 } 823 824 $$ctxt->setList(@valid_elems); 825 821 } 822 } 823 824 $$ctxt->setList(@valid_elems); 825 826 826 if ($#valid_elems == -1) 827 827 { … … 848 848 push(@valid_elems,$elem); 849 849 push(@valid_values,$text); 850 } 850 } 851 851 } 852 852 853 853 $$ctxt->setList(@valid_elems); 854 854 $$ctxt->setValues(@valid_values); 855 855 856 856 if ($#valid_elems == -1) 857 857 { … … 878 878 { 879 879 push(@valid_elems,$elem); 880 } 881 } 882 883 $$ctxt->setList(@valid_elems); 884 880 } 881 } 882 883 $$ctxt->setList(@valid_elems); 884 885 885 if ($#valid_elems == -1) 886 886 { -
perl/modules/Jabber/lib/XML/Stream/XPath/Query.pm
rc2bed55 r7869e48 37 37 bless($self,$proto); 38 38 39 $self->{TOKENS} = [ '/','[',']','@','"',"'",'=','!','(',')',':',' ',',']; 39 $self->{TOKENS} = [ '/','[',']','@','"',"'",'=','!','(',')',':',' ',',']; 40 40 $self->{QUERY} = shift; 41 41 42 42 if (!defined($self->{QUERY}) || ($self->{QUERY} eq "")) 43 43 { 44 44 confess("No query string specified"); 45 45 } 46 46 47 47 $self->parseQuery(); 48 48 49 49 return $self; 50 50 } … … 52 52 53 53 sub getNextToken 54 { 54 { 55 55 my $self = shift; 56 56 my $pos = shift; … … 104 104 my $token_start = ++$$pos; 105 105 my $ident; 106 106 107 107 if (defined($token)) 108 108 { … … 193 193 return; 194 194 } 195 195 196 196 $$pos = $token_start; 197 197 my $val = $self->getNextIdentifier($pos); … … 234 234 235 235 $self->getOp($pos,$token); 236 236 237 237 foreach my $arg ($op_pos..$#{$self->{OPS}}) 238 238 { … … 241 241 242 242 splice(@{$self->{OPS}},$op_pos); 243 243 244 244 } 245 245 elsif ($token eq ")") … … 261 261 confess("Found ',' but not in a function"); 262 262 } 263 263 264 264 } 265 265 elsif ($token eq "=") … … 280 280 } 281 281 $$pos++; 282 282 283 283 my $tmp_op; 284 284 while(!defined($tmp_op)) … … 307 307 confess("Token undefined"); 308 308 } 309 309 310 310 $loop = 0 unless $in_context; 311 311 } -
perl/modules/Jabber/lib/XML/Stream/XPath/Value.pm
rc2bed55 r7869e48 96 96 97 97 sub getAttribs 98 { 98 { 99 99 my $self = shift; 100 100 return unless (scalar(keys(%{$self->{ATTRIBS}})) > 0);
Note: See TracChangeset
for help on using the changeset viewer.