Ignore:
Timestamp:
Jan 12, 2013, 1:43:13 PM (12 years ago)
Author:
Jason Gross <jgross@mit.edu>
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)
Message:
Remove trailing whitespace

This commit was made with the command sequence

    for i in $(git ls-files | tr '\n' ' ');
    do
      echo $i; sed -i s'/\s\+$//g' "$(readlink -f $i)";
    done
Location:
perl/modules/Jabber/lib/XML
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • perl/modules/Jabber/lib/XML/Stream.pm

    ra8d5a39 r7869e48  
    317317
    318318        my $lc = lc($module);
    319        
     319
    320320        eval("\$HANDLERS{\$lc}->{startElement} = \\&XML::Stream::${module}::_handle_element;");
    321321        eval("\$HANDLERS{\$lc}->{endElement}   = \\&XML::Stream::${module}::_handle_close;");
     
    600600
    601601    my $root = $self->GetRoot($sid);
    602    
     602
    603603    if ($root->{xmlns} ne $self->{SIDS}->{$serverid}->{namespace})
    604604    {
     
    668668    }
    669669    while($#_ >= 0) { $self->{SIDS}->{newconnection}->{ lc pop(@_) } = pop(@_); }
    670    
     670
    671671    my $timeout = exists($self->{SIDS}->{newconnection}->{timeout}) ?
    672672                  delete($self->{SIDS}->{newconnection}->{timeout}) :
     
    674674
    675675    $self->debug(4,"Connect: timeout($timeout)");
    676    
     676
    677677
    678678    if (exists($self->{SIDS}->{newconnection}->{srv}))
     
    683683            my $res = Net::DNS::Resolver->new();
    684684            my $query = $res->query($self->{SIDS}->{newconnection}->{srv}.".".$self->{SIDS}->{newconnection}->{hostname},"SRV");
    685            
     685
    686686            if ($query)
    687             { 
     687            {
    688688                $self->{SIDS}->{newconnection}->{hostname} = ($query->answer)[0]->target();
    689689                $self->{SIDS}->{newconnection}->{port} = ($query->answer)[0]->port();
     
    771771        $self->{SIDS}->{newconnection}->{sock} =
    772772            new FileHandle(">&STDOUT");
    773     } 
     773    }
    774774
    775775    #---------------------------------------------------------------------------
     
    10301030    #---------------------------------------------------------------------------
    10311031    my %stream_args;
    1032    
     1032
    10331033    if (($self->{SIDS}->{$currsid}->{connectiontype} eq "tcpip") ||
    10341034        ($self->{SIDS}->{$currsid}->{connectiontype} eq "http"))
     
    10361036        $stream_args{to}= $self->{SIDS}->{$currsid}->{hostname}
    10371037            unless exists($self->{SIDS}->{$currsid}->{to});
    1038        
     1038
    10391039        $stream_args{to} = $self->{SIDS}->{$currsid}->{to}
    10401040            if exists($self->{SIDS}->{$currsid}->{to});
     
    10441044                ($self->{SIDS}->{$currsid}->{myhostname} ne "")
    10451045               );
    1046        
     1046
    10471047        $stream_args{from} = $self->{SIDS}->{$currsid}->{from}
    10481048            if exists($self->{SIDS}->{$currsid}->{from});
    1049        
     1049
    10501050        $stream_args{id} = $self->{SIDS}->{$currsid}->{id}
    10511051            if (exists($self->{SIDS}->{$currsid}->{id}) &&
     
    10551055        $stream_args{namespaces} = $self->{SIDS}->{$currsid}->{namespaces};
    10561056    }
    1057    
     1057
    10581058    my $stream =
    10591059        $self->StreamHeader(
     
    11721172        }
    11731173    }
    1174        
     1174
    11751175    return $self->GetRoot($sid);
    11761176}
     
    13331333    #---------------------------------------------------------------------------
    13341334    $self->{SIDS}->{$sid}->{streamfeatures}->{received} = 0;
    1335    
     1335
    13361336    #---------------------------------------------------------------------------
    13371337    # First acitivty is the connection... duh. =)
     
    15221522                $self->debug(4,"Process: sid($sid) time(",time,") timeout(undef)");
    15231523            }
    1524            
     1524
    15251525            $self->Respond($sid)
    15261526                if (exists($self->{SIDS}->{$sid}->{activitytimeout}) &&
     
    16371637    $self->debug(3,"Send: sid($sid)");
    16381638    $self->debug(3,"Send: status($self->{SIDS}->{$sid}->{status})");
    1639    
     1639
    16401640    $self->{SIDS}->{$sid}->{keepalive} = time;
    16411641
     
    16771677                return;
    16781678            }
    1679            
     1679
    16801680            $self->debug(4,"Send: SENDWRITTEN($self->{SENDWRITTEN})");
    16811681
     
    17361736        }
    17371737    }
    1738    
     1738
    17391739    #-------------------------------------------------------------------------
    17401740    # XMPP-TLS - 1.0
     
    17531753        }
    17541754    }
    1755    
     1755
    17561756    #-------------------------------------------------------------------------
    17571757    # XMPP-Bind - 1.0
     
    17621762        $self->{SIDS}->{$sid}->{streamfeatures}->{'xmpp-bind'} = 1;
    17631763    }
    1764    
     1764
    17651765    #-------------------------------------------------------------------------
    17661766    # XMPP-Session - 1.0
     
    17711771        $self->{SIDS}->{$sid}->{streamfeatures}->{'xmpp-session'} = 1;
    17721772    }
    1773    
     1773
    17741774}
    17751775
     
    18331833        $self->TLSClientFailure($sid,$node);
    18341834    }
    1835    
     1835
    18361836    if ($tag eq "proceed")
    18371837    {
     
    18531853    $timeout = 120 unless defined($timeout);
    18541854    $timeout = 120 if ($timeout eq "");
    1855    
     1855
    18561856    $self->TLSStartTLS($sid);
    18571857
     
    19041904        return;
    19051905    }
    1906    
     1906
    19071907    IO::Socket::SSL->start_SSL($self->{SIDS}->{$sid}->{sock},{SSL_verify_mode=>0x00});
    19081908
     
    19101910    $self->debug(1,"TLSClientProceed: SSL: We are secure")
    19111911        if ($self->{SIDS}->{$sid}->{sock});
    1912    
     1912
    19131913    $self->{SIDS}->{$sid}->{tls}->{done} = 1;
    19141914    $self->{SIDS}->{$sid}->{tls}->{secure} = 1;
     
    19251925    my $self = shift;
    19261926    my $sid = shift;
    1927    
     1927
    19281928    return $self->{SIDS}->{$sid}->{tls}->{secure};
    19291929}
     
    19391939    my $self = shift;
    19401940    my $sid = shift;
    1941    
     1941
    19421942    return $self->{SIDS}->{$sid}->{tls}->{done};
    19431943}
     
    19531953    my $self = shift;
    19541954    my $sid = shift;
    1955    
     1955
    19561956    return $self->{SIDS}->{$sid}->{tls}->{error};
    19571957}
     
    19681968    my $sid = shift;
    19691969    my $node = shift;
    1970    
     1970
    19711971    my $type = &XPath($node,"*/name()");
    19721972
     
    19861986    my $sid = shift;
    19871987    my $type = shift;
    1988    
     1988
    19891989    $self->Send($sid,"<failure xmlns='".&ConstXMLNS('xmpp-tls')."'><${type}/></failure>");
    19901990}
     
    20182018        $self->SASLAnswerChallenge($sid,$node);
    20192019    }
    2020    
     2020
    20212021    if ($tag eq "failure")
    20222022    {
    20232023        $self->SASLClientFailure($sid,$node);
    20242024    }
    2025    
     2025
    20262026    if ($tag eq "success")
    20272027    {
     
    20452045    my $challenge64 = &XPath($node,"text()");
    20462046    my $challenge = MIME::Base64::decode_base64($challenge64);
    2047    
     2047
    20482048    #-------------------------------------------------------------------------
    20492049    # As far as I can tell, if the challenge contains rspauth, then we authed.
     
    21122112
    21132113    return unless defined($mechanisms);
    2114    
     2114
    21152115    my $sasl = new Authen::SASL(mechanism=>join(" ",@{$mechanisms}),
    21162116                                callback=>{
     
    21402140    my $self = shift;
    21412141    my $sid = shift;
    2142    
     2142
    21432143    return $self->{SIDS}->{$sid}->{sasl}->{authed};
    21442144}
     
    21542154    my $self = shift;
    21552155    my $sid = shift;
    2156    
     2156
    21572157    return $self->{SIDS}->{$sid}->{sasl}->{done};
    21582158}
     
    21682168    my $self = shift;
    21692169    my $sid = shift;
    2170    
     2170
    21712171    return $self->{SIDS}->{$sid}->{sasl}->{error};
    21722172}
     
    21832183    my $sid = shift;
    21842184    my $node = shift;
    2185    
     2185
    21862186    my $type = &XPath($node,"*/name()");
    21872187
     
    22012201    my $sid = shift;
    22022202    my $node = shift;
    2203    
     2203
    22042204    $self->{SIDS}->{$sid}->{sasl}->{authed} = 1;
    22052205    $self->{SIDS}->{$sid}->{sasl}->{done} = 1;
     
    22172217    my $sid = shift;
    22182218    my $type = shift;
    2219    
     2219
    22202220    $self->Send($sid,"<failure xmlns='".&ConstXMLNS('xmpp-sasl')."'><${type}/></failure>");
    22212221}
     
    22922292        # Make sure we are receiving a valid stream on the same namespace.
    22932293        #---------------------------------------------------------------------
    2294        
     2294
    22952295        $self->debug(3,"_handle_root: ($self->{SIDS}->{$self->{SIDS}->{$sid}->{serverid}}->{namespace})");
    22962296        $self->{SIDS}->{$sid}->{status} =
     
    23282328        }
    23292329    }
    2330    
     2330
    23312331    #-------------------------------------------------------------------------
    23322332    # Sometimes we will get an error, so let's parse the tag assuming that we
     
    23352335    my $stream_prefix = $self->StreamPrefix($sid);
    23362336    $self->debug(5,"_handle_root: stream_prefix($stream_prefix)");
    2337    
     2337
    23382338    if ($tag eq $stream_prefix.":error")
    23392339    {
     
    24412441    $self->{SIDS}->{$sid}->{streamerror}->{type} = "unknown";
    24422442    $self->{SIDS}->{$sid}->{streamerror}->{node} = $node;
    2443    
     2443
    24442444    #-------------------------------------------------------------------------
    24452445    # Check for older 0.9 streams and handle the errors for them.
     
    26762676    my $tree = shift;
    26772677    my $path = shift;
    2678    
     2678
    26792679    my $query = new XML::Stream::XPath::Query($path);
    26802680    my $result = $query->execute($tree);
     
    26832683        my %attribs = $result->getAttribs();
    26842684        return %attribs if (scalar(keys(%attribs)) > 0);
    2685        
     2685
    26862686        my @values = $result->getValues();
    26872687        @values = $result->getList() unless ($#values > -1);
     
    27032703    my $tree = shift;
    27042704    my $path = shift;
    2705    
     2705
    27062706    my $query = new XML::Stream::XPath::Query($path);
    27072707    my $result = $query->execute($tree);
     
    28912891{
    28922892    my $const = shift;
    2893    
     2893
    28942894    return $XMLNS{$const};
    28952895}
     
    29052905    my $self = shift;
    29062906    my $sid = shift;
    2907    
     2907
    29082908    return $self->ns2prefix($sid,&ConstXMLNS("stream"));
    29092909}
     
    29912991
    29922992    $self->debug(1,"LoadSSL: Load the IO::Socket::SSL module");
    2993    
     2993
    29942994    if (defined($SSL) && ($SSL == 1))
    29952995    {
     
    29972997        return 1;
    29982998    }
    2999    
     2999
    30003000    if (defined($SSL) && ($SSL == 0))
    30013001    {
     
    31063106        $stream .= " ".$ns->GetStream();
    31073107    }
    3108    
     3108
    31093109    $stream .= ">";
    31103110
  • perl/modules/Jabber/lib/XML/Stream/Namespace.pm

    rc2bed55 r7869e48  
    2525=head1 NAME
    2626
    27 XML::Stream::Namespace - Object to make defining Namespaces easier in 
     27XML::Stream::Namespace - Object to make defining Namespaces easier in
    2828                         XML::Stream.
    2929
     
    4949  GetAttributes() returns a hash ( attrib1=>"value1",attrib2=>"value2")
    5050  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'
    5353     mynamespace:attrib2='value2'"
    5454
     
    7171  # of the stream to foo.bar.org:1234...
    7272  #
    73   #   <stream:stream 
     73  #   <stream:stream
    7474  #    xmlns:stream="http://etherx.jabber.org/streams"
    7575  #    to="foo.bar.org"
    76   #    xmlns="foo:bar" 
     76  #    xmlns="foo:bar"
    7777  #    xmlns:mynamespace="http://www.mynamespace.org/xmlns"
    7878  #    mynamespace:foo="bar"
    7979  #    mynamespace:bob="vila">
    8080  #
    81    
     81
    8282
    8383=head1 AUTHOR
     
    183183    $string .= "='".$self->GetAttributes($attrib)."'";
    184184  }
    185    
     185
    186186  return $string;
    187187}
  • perl/modules/Jabber/lib/XML/Stream/Node.pm

    rc2bed55 r7869e48  
    8585
    8686  remove_child(node) - removes the child node from the current node.
    87  
     87
    8888  remove_cdata() - removes all of the cdata children from the current node.
    8989
     
    120120
    121121  XPath(path) - run XML::Stream::XPath on this node.
    122  
     122
    123123  XPathCheck(path) - run XML::Stream::XPath on this node and return 1 or 0
    124124                     to see if it matches or not.
     
    266266
    267267    return $cdata;
    268 } 
     268}
    269269
    270270
     
    286286        splice(@{$self->{CHILDREN}},$index,1);
    287287    }
    288 } 
     288}
    289289
    290290
     
    294294    return () unless exists($self->{ATTRIBS});
    295295    return %{$self->{ATTRIBS}};
    296 } 
     296}
    297297
    298298
     
    308308
    309309sub put_attrib
    310 { 
     310{
    311311    my $self = shift;
    312312    my (%att) = @_;
     
    366366    my ($tag) = @_;
    367367
    368     $self->{TAG} = $tag; 
     368    $self->{TAG} = $tag;
    369369}
    370370
     
    513513
    514514    $self->debug(2,"Node: _handle_close: check2(",$#{$self->{SIDS}->{$sid}->{node}},")");
    515    
     515
    516516    if($#{$self->{SIDS}->{$sid}->{node}} == -1)
    517517    {
     
    521521        {
    522522            my $stream_prefix = $self->StreamPrefix($sid);
    523            
     523
    524524            if(defined($self->{SIDS}->{$sid}->{node}->[0]) &&
    525525               ($self->{SIDS}->{$sid}->{node}->[0]->get_tag() =~ /^${stream_prefix}\:/))
     
    542542                {
    543543                    my $xmlns = $node->get_attrib("xmlns");
    544                    
     544
    545545                    $self->ProcessSASLPacket($sid,$node)
    546546                        if ($xmlns eq &XML::Stream::ConstXMLNS("xmpp-sasl"));
  • perl/modules/Jabber/lib/XML/Stream/Parser.pm

    rc2bed55 r7869e48  
    324324                $self->{CNAME}->[$self->{CURR}] = $name;
    325325            }
    326    
     326
    327327            $self->{XML} = substr($self->{XML},$close+1,length($self->{XML})-$close-1);
    328328            next;
     
    337337                return $self->returnData(0);
    338338            }
    339            
     339
    340340            &{$self->{HANDLER}->{characters}}($self,substr($self->{XML},9,$cdataclose-9));
    341            
     341
    342342            $self->{XML} = substr($self->{XML},$cdataclose+3,length($self->{XML})-$cdataclose-3);
    343343            next;
     
    510510    return unless ($self->{DOC} == 1);
    511511
    512     if ($self->{STYLE} eq "debug") 
     512    if ($self->{STYLE} eq "debug")
    513513    {
    514514        my $str = $cdata;
     
    530530            push @{$self->{TREE}[$#{$self->{TREE}}]}, 0;
    531531            push @{$self->{TREE}[$#{$self->{TREE}}]}, $cdata;
    532         } 
     532        }
    533533    }
    534534}
  • perl/modules/Jabber/lib/XML/Stream/Tree.pm

    rc2bed55 r7869e48  
    142142        push @{$self->{SIDS}->{$sid}->{tree}[$#{$self->{SIDS}->{$sid}->{tree}}]}, 0;
    143143        push @{$self->{SIDS}->{$sid}->{tree}[$#{$self->{SIDS}->{$sid}->{tree}}]}, $cdata;
    144     } 
     144    }
    145145}
    146146
     
    187187            if(defined($self->{SIDS}->{$sid}->{tree}->[0]) &&
    188188               ($self->{SIDS}->{$sid}->{tree}->[0] =~ /^${stream_prefix}\:/))
    189             { 
     189            {
    190190                my @tree = @{$self->{SIDS}->{$sid}->{tree}};
    191191                $self->{SIDS}->{$sid}->{tree} = [];
     
    196196                my @tree = @{$self->{SIDS}->{$sid}->{tree}};
    197197                $self->{SIDS}->{$sid}->{tree} = [];
    198                
     198
    199199                my @special =
    200200                    &XML::Stream::XPath(
     
    384384                    return 1;
    385385                }
    386                
     386
    387387                #---------------------------------------------------------------------
    388388                # Return the raw CDATA value without mark ups, or the value of the
     
    592592
    593593    my $str = "";
    594     if (ref($parseTree->[0]) eq "") 
     594    if (ref($parseTree->[0]) eq "")
    595595    {
    596596        if ($parseTree->[0] eq "0")
     
    608608        {
    609609            $str .= ">";
    610            
     610
    611611            my $index = 1;
    612612            while($index <= $#{$parseTree->[1]})
     
    616616                $index += 2;
    617617            }
    618            
     618
    619619            $str .= $rawXML if defined($rawXML);
    620620            $str .= "</".$parseTree->[0].">";
  • perl/modules/Jabber/lib/XML/Stream/XPath/Op.pm

    rc2bed55 r7869e48  
    5050    $self->{TYPE} = shift;
    5151    $self->{VALUE} = shift;
    52    
     52
    5353    return $self;
    5454}
     
    165165        {
    166166            push(@valid_elems,$elem);
    167         }   
    168     }
    169 
    170     $$ctxt->setList(@valid_elems);
    171    
     167        }
     168    }
     169
     170    $$ctxt->setList(@valid_elems);
     171
    172172    if ($#valid_elems == -1)
    173173    {
     
    224224
    225225    my @valid_elems;
    226    
     226
    227227    foreach my $elem (@elems)
    228228    {
    229229        push(@valid_elems,$self->descend($elem));
    230230    }
    231    
     231
    232232    $$ctxt->setList(@valid_elems);
    233233
     
    247247
    248248    my @valid_elems;
    249    
     249
    250250    if (($self->{VALUE} eq "*") || (&XML::Stream::GetXMLData("tag",$elem) eq $self->{VALUE}))
    251251    {
    252252        push(@valid_elems,$elem);
    253253    }
    254    
     254
    255255    foreach my $child (&XML::Stream::GetXMLData("child array",$elem,"*"))
    256256    {
    257257        push(@valid_elems,$self->descend($child));
    258258    }
    259    
     259
    260260    return @valid_elems;
    261261}
     
    326326        }
    327327    }
    328    
     328
    329329    $$ctxt->setList(@valid_elems);
    330330
     
    343343    my $elem = shift;
    344344    return &XML::Stream::GetXMLData("value",$elem);
    345 } 
     345}
    346346
    347347
     
    374374    $tmp_ctxt->setList($$ctxt->getList());
    375375    $tmp_ctxt->in_context(0);
    376    
     376
    377377    if (!$self->{OP_L}->isValid(\$tmp_ctxt) || !$self->{OP_R}->isValid(\$tmp_ctxt))
    378378    {
     
    393393        @valid_elems = $$ctxt->getList();
    394394    }
    395    
     395
    396396    $$ctxt->setList(@valid_elems);
    397397
     
    414414    print $space,"    op_l: ";
    415415    $self->{OP_L}->display($space."    ");
    416    
     416
    417417    print $space,"    op_r: ";
    418418    $self->{OP_R}->display($space."    ");
     
    449449    $tmp_ctxt->setList($$ctxt->getList());
    450450    $tmp_ctxt->in_context(0);
    451    
     451
    452452    if (!$self->{OP_L}->isValid(\$tmp_ctxt) || !$self->{OP_R}->isValid(\$tmp_ctxt))
    453453    {
     
    468468        @valid_elems = $$ctxt->getList();
    469469    }
    470    
     470
    471471    $$ctxt->setList(@valid_elems);
    472472
     
    489489    print $space,"    op_l: ";
    490490    $self->{OP_L}->display($space."    ");
    491    
     491
    492492    print $space,"    op_r: ";
    493493    $self->{OP_R}->display($space."    ");
     
    524524    my @values;
    525525    my %attribs;
    526    
     526
    527527    foreach my $elem (@elems)
    528528    {
     
    558558        return;
    559559    }
    560    
     560
    561561    return 1;
    562562}
     
    607607    my $opl = $self->{OP_L}->isValid($ctxt);
    608608    my $opr = $self->{OP_R}->isValid($ctxt);
    609    
     609
    610610    if ($opl && $opr)
    611611    {
     
    628628    print $space,"  op_l: \n";
    629629    $self->{OP_L}->display($space."    ");
    630    
     630
    631631    print $space,"  op_r: \n";
    632632    $self->{OP_R}->display($space."    ");
     
    672672        my $opl = $self->{OP_L}->isValid(\$tmp_ctxt_l);
    673673        my $opr = $self->{OP_R}->isValid(\$tmp_ctxt_r);
    674    
     674
    675675        if ($opl || $opr)
    676676        {
    677677            push(@valid_elems,$elem);
    678         }   
    679     }
    680 
    681     $$ctxt->setList(@valid_elems);
    682    
     678        }
     679    }
     680
     681    $$ctxt->setList(@valid_elems);
     682
    683683    if ($#valid_elems == -1)
    684684    {
     
    699699    print "$space    op_l: ";
    700700    $self->{OP_L}->display("$space    ");
    701    
     701
    702702    print "$space    op_r: ";
    703703    $self->{OP_R}->display("$space    ");
     
    750750    my $self = shift;
    751751    my $elem = shift;
    752    
     752
    753753    my $result;
    754754    eval("\$result = &{\$XML::Stream::XPath::VALUES{\$self->{VALUE}}}(\$elem);");
     
    790790            push(@valid_elems,$elem);
    791791            push(@valid_values,$text);
    792         }   
     792        }
    793793    }
    794794
    795795    $$ctxt->setList(@valid_elems);
    796796    $$ctxt->setValues(@valid_values);
    797    
     797
    798798    if ($#valid_elems == -1)
    799799    {
     
    819819        {
    820820            push(@valid_elems,$elem);
    821         }   
    822     }
    823 
    824     $$ctxt->setList(@valid_elems);
    825    
     821        }
     822    }
     823
     824    $$ctxt->setList(@valid_elems);
     825
    826826    if ($#valid_elems == -1)
    827827    {
     
    848848            push(@valid_elems,$elem);
    849849            push(@valid_values,$text);
    850         }   
     850        }
    851851    }
    852852
    853853    $$ctxt->setList(@valid_elems);
    854854    $$ctxt->setValues(@valid_values);
    855    
     855
    856856    if ($#valid_elems == -1)
    857857    {
     
    878878        {
    879879            push(@valid_elems,$elem);
    880         }   
    881     }
    882 
    883     $$ctxt->setList(@valid_elems);
    884    
     880        }
     881    }
     882
     883    $$ctxt->setList(@valid_elems);
     884
    885885    if ($#valid_elems == -1)
    886886    {
  • perl/modules/Jabber/lib/XML/Stream/XPath/Query.pm

    rc2bed55 r7869e48  
    3737    bless($self,$proto);
    3838
    39     $self->{TOKENS} = [ '/','[',']','@','"',"'",'=','!','(',')',':',' ',',']; 
     39    $self->{TOKENS} = [ '/','[',']','@','"',"'",'=','!','(',')',':',' ',','];
    4040    $self->{QUERY} = shift;
    41    
     41
    4242    if (!defined($self->{QUERY}) || ($self->{QUERY} eq ""))
    4343    {
    4444        confess("No query string specified");
    4545    }
    46    
     46
    4747    $self->parseQuery();
    48    
     48
    4949    return $self;
    5050}
     
    5252
    5353sub getNextToken
    54 { 
     54{
    5555    my $self = shift;
    5656    my $pos = shift;
     
    104104        my $token_start = ++$$pos;
    105105        my $ident;
    106      
     106
    107107        if (defined($token))
    108108        {
     
    193193                        return;
    194194                    }
    195                    
     195
    196196                    $$pos = $token_start;
    197197                    my $val = $self->getNextIdentifier($pos);
     
    234234
    235235                $self->getOp($pos,$token);
    236                
     236
    237237                foreach my $arg ($op_pos..$#{$self->{OPS}})
    238238                {
     
    241241
    242242                splice(@{$self->{OPS}},$op_pos);
    243                
     243
    244244            }
    245245            elsif ($token eq ")")
     
    261261                    confess("Found ',' but not in a function");
    262262                }
    263  
     263
    264264            }
    265265            elsif ($token eq "=")
     
    280280                }
    281281                $$pos++;
    282                
     282
    283283                my $tmp_op;
    284284                while(!defined($tmp_op))
     
    307307            confess("Token undefined");
    308308        }
    309        
     309
    310310        $loop = 0 unless $in_context;
    311311    }
  • perl/modules/Jabber/lib/XML/Stream/XPath/Value.pm

    rc2bed55 r7869e48  
    9696
    9797sub getAttribs
    98 { 
     98{
    9999    my $self = shift;
    100100    return unless (scalar(keys(%{$self->{ATTRIBS}})) > 0);
Note: See TracChangeset for help on using the changeset viewer.