Show
Ignore:
Timestamp:
08.07.2013 22:17:10 (6 years ago)
Author:
davidb
Message:

Bumped up to using version 2.41 of XML::Parser so use of 'tie' no longer causes deprecated message

Location:
main/trunk/release-kits/shared/linux/XML-Parser/perl-5.14
Files:
12 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/release-kits/shared/linux/XML-Parser/perl-5.14/XML/Parser.pm

    r27768 r27777  
    99package XML::Parser; 
    1010 
     11use strict; 
     12 
     13use vars qw($VERSION $LWP_load_failed); 
     14 
    1115use Carp; 
    1216 
    1317BEGIN { 
    1418  require XML::Parser::Expat; 
    15   $VERSION = '2.34'; 
     19  $VERSION = '2.41'; 
    1620  die "Parser.pm and Expat.pm versions don't match" 
    1721    unless $VERSION eq $XML::Parser::Expat::VERSION; 
    1822} 
    19  
    20 use strict; 
    21  
    22 use vars qw($VERSION $LWP_load_failed); 
    2323 
    2424$LWP_load_failed = 0; 
     
    144144  my $final = delete $handlers{Final}; 
    145145 
    146   my $expatnb = new XML::Parser::ExpatNB(@expat_options, @_); 
     146  my $expatnb = XML::Parser::ExpatNB->new(@expat_options, @_); 
    147147  $expatnb->setHandlers(%handlers); 
    148148 
     
    168168  } 
    169169   
    170   my $expat = new XML::Parser::Expat(@expat_options, @_); 
     170  my $expat = XML::Parser::Expat->new(@expat_options, @_); 
    171171  my %handlers = %{$self->{Handlers}}; 
    172172  my $init = delete $handlers{Init}; 
     
    298298 
    299299  require IO::File; 
    300   my $fh = new IO::File($path); 
     300  my $fh = IO::File->new($path); 
    301301  unless (defined $fh) { 
    302302    $xp->{ErrorMessage} 
     
    337337 
    338338  use XML::Parser; 
    339    
    340   $p1 = new XML::Parser(Style => 'Debug'); 
     339 
     340  $p1 = XML::Parser->new(Style => 'Debug'); 
    341341  $p1->parsefile('REC-xml-19980210.xml'); 
    342342  $p1->parse('<foo id="me">Hello World</foo>'); 
    343343 
    344344  # Alternative 
    345   $p2 = new XML::Parser(Handlers => {Start => \&handle_start, 
     345  $p2 = XML::Parser->new(Handlers => {Start => \&handle_start, 
    346346                                     End   => \&handle_end, 
    347347                                     Char  => \&handle_char}); 
     
    349349 
    350350  # Another alternative 
    351   $p3 = new XML::Parser(ErrorContext => 2); 
     351  $p3 = XML::Parser->new(ErrorContext => 2); 
    352352 
    353353  $p3->setHandlers(Char    => \&text, 
     
    376376case they override options given at XML::Parser creation time. 
    377377 
    378 The behavior of the parser is controlled either by C<L</Style>> and/or 
    379 C<L</Handlers>> options, or by L</setHandlers> method. These all provide 
     378The behavior of the parser is controlled either by C<L</STYLES>> and/or 
     379C<L</HANDLERS>> options, or by L</setHandlers> method. These all provide 
    380380mechanisms for XML::Parser to set the handlers needed by XML::Parser::Expat. 
    381381If neither C<Style> nor C<Handlers> are specified, then parsing just 
  • main/trunk/release-kits/shared/linux/XML-Parser/perl-5.14/XML/Parser/Encodings/README

    r27768 r27777  
    11This directory contains binary encoding maps for some selected encodings. 
    2 If they are placed in a directoy listed in @XML::Parser::Expat::Encoding_Path, 
    3 then they are automaticly loaded by the XML::Parser::Expat::load_encoding 
     2If they are placed in a directory listed in @XML::Parser::Expat::Encoding_Path, 
     3then they are automatically loaded by the XML::Parser::Expat::load_encoding 
    44function as needed. Otherwise you may load what you need directly by 
    5 explicity calling this function. 
     5explicitly calling this function. 
    66 
    77These maps were generated by a perl script that comes with the module 
  • main/trunk/release-kits/shared/linux/XML-Parser/perl-5.14/XML/Parser/Expat.pm

    r27768 r27777  
    1111 
    1212@ISA = qw(DynaLoader); 
    13 $VERSION = "2.34" ; 
     13$VERSION = "2.41"; 
    1414 
    1515$have_File_Spec = $INC{'File/Spec.pm'} || do 'File/Spec.pm'; 
     
    443443   
    444444  if (defined $arg) { 
     445    local *@; 
    445446    if (ref($arg) and UNIVERSAL::isa($arg, 'IO::Handle')) { 
    446447      $ioref = $arg; 
    447     } elsif (tied($arg)) { 
    448       my $class = ref($arg); 
    449       no strict 'refs'; 
    450       $ioref = $arg if defined &{"${class}::TIEHANDLE"}; 
     448    } elsif ($] < 5.008 and defined tied($arg)) { 
     449      require IO::Handle; 
     450      $ioref = $arg; 
    451451    } 
    452452    else { 
     
    456456        $ioref = *{$arg}{IO} if defined *{$arg}; 
    457457      }; 
    458       undef $@; 
    459458    } 
    460459  } 
     
    463462    my $delim = $self->{Stream_Delimiter}; 
    464463    my $prev_rs; 
     464    my $ioclass = ref $ioref; 
     465    $ioclass = "IO::Handle" if !length $ioclass; 
    465466     
    466     $prev_rs = ref($ioref)->input_record_separator("\n$delim\n") 
     467    $prev_rs = $ioclass->input_record_separator("\n$delim\n") 
    467468      if defined($delim); 
    468469     
    469470    $result = ParseStream($parser, $ioref, $delim); 
    470471     
    471     ref($ioref)->input_record_separator($prev_rs) 
     472    $ioclass->input_record_separator($prev_rs) 
    472473      if defined($delim); 
    473474  } else { 
     
    496497 
    497498################################################################ 
    498 package XML::Parser::ContentModel; 
     499package #hide from PAUSE 
     500 XML::Parser::ContentModel; 
    499501use overload '""' => \&asString, 'eq' => \&thiseq; 
    500502 
     
    583585 
    584586################################################################ 
    585 package XML::Parser::ExpatNB; 
     587package #hide from PAUSE 
     588 XML::Parser::ExpatNB; 
    586589 
    587590use vars qw(@ISA); 
     
    649652################################################################ 
    650653 
    651 package XML::Parser::Encinfo; 
     654package  #hide from PAUSE 
     655 XML::Parser::Encinfo; 
    652656 
    653657sub DESTROY { 
     
    668672 use XML::Parser::Expat; 
    669673 
    670  $parser = new XML::Parser::Expat; 
     674 $parser = XML::Parser::Expat->new; 
    671675 $parser->setHandlers('Start' => \&sh, 
    672676                      'End'   => \&eh, 
    673677                      'Char'  => \&ch); 
    674  open(FOO, 'info.xml') or die "Couldn't open"; 
     678 open(FOO, '<', 'info.xml') or die "Couldn't open"; 
    675679 $parser->parse(*FOO); 
    676680 close(FOO); 
     
    12131217table. Earlier encodings of the same name are replaced. 
    12141218 
    1215 This function is automaticly called by expat when it encounters an encoding 
     1219This function is automatically called by expat when it encounters an encoding 
    12161220it doesn't know about. Expat shouldn't call this twice for the same 
    12171221encoding name. The only reason users should use this function is to 
  • main/trunk/release-kits/shared/linux/XML-Parser/perl-5.14/XML/Parser/Style/Debug.pm

    r27768 r27777  
    1 # $Id: Debug.pm,v 1.1 2003/07/27 16:07:49 matt Exp $ 
     1# $Id: Debug.pm,v 1.1 2003-07-27 16:07:49 matt Exp $ 
    22 
    33package XML::Parser::Style::Debug; 
  • main/trunk/release-kits/shared/linux/XML-Parser/perl-5.14/XML/Parser/Style/Objects.pm

    r27768 r27777  
    1 # $Id: Objects.pm,v 1.1 2003/08/18 20:20:51 matt Exp $ 
     1# $Id: Objects.pm,v 1.1 2003-08-18 20:20:51 matt Exp $ 
    22 
    33package XML::Parser::Style::Objects; 
  • main/trunk/release-kits/shared/linux/XML-Parser/perl-5.14/XML/Parser/Style/Stream.pm

    r27768 r27777  
    1 # $Id: Stream.pm,v 1.1 2003/07/27 16:07:49 matt Exp $ 
     1# $Id: Stream.pm,v 1.1 2003-07-27 16:07:49 matt Exp $ 
    22 
    33package XML::Parser::Style::Stream; 
  • main/trunk/release-kits/shared/linux/XML-Parser/perl-5.14/XML/Parser/Style/Subs.pm

    r27768 r27777  
    1 # $Id: Subs.pm,v 1.1 2003/07/27 16:07:49 matt Exp $ 
     1# $Id: Subs.pm,v 1.1 2003-07-27 16:07:49 matt Exp $ 
    22 
    33package XML::Parser::Style::Subs; 
  • main/trunk/release-kits/shared/linux/XML-Parser/perl-5.14/XML/Parser/Style/Tree.pm

    r27768 r27777  
    1 # $Id: Tree.pm,v 1.2 2003/07/31 07:54:51 matt Exp $ 
     1# $Id: Tree.pm,v 1.2 2003-07-31 07:54:51 matt Exp $ 
    22 
    33package XML::Parser::Style::Tree; 
  • main/trunk/release-kits/shared/linux/XML-Parser/perl-5.14/auto/XML/Parser/.packlist

    r27768 r27777  
    1111/home/ubuntu/research/code/greenstone3-svn/gs2build/perllib/cpan/perl-5.14/XML/Parser/Encodings/big5.enc 
    1212/home/ubuntu/research/code/greenstone3-svn/gs2build/perllib/cpan/perl-5.14/XML/Parser/Encodings/euc-kr.enc 
     13/home/ubuntu/research/code/greenstone3-svn/gs2build/perllib/cpan/perl-5.14/XML/Parser/Encodings/ibm866.enc 
    1314/home/ubuntu/research/code/greenstone3-svn/gs2build/perllib/cpan/perl-5.14/XML/Parser/Encodings/iso-8859-2.enc 
    1415/home/ubuntu/research/code/greenstone3-svn/gs2build/perllib/cpan/perl-5.14/XML/Parser/Encodings/iso-8859-3.enc 
     
    1819/home/ubuntu/research/code/greenstone3-svn/gs2build/perllib/cpan/perl-5.14/XML/Parser/Encodings/iso-8859-8.enc 
    1920/home/ubuntu/research/code/greenstone3-svn/gs2build/perllib/cpan/perl-5.14/XML/Parser/Encodings/iso-8859-9.enc 
     21/home/ubuntu/research/code/greenstone3-svn/gs2build/perllib/cpan/perl-5.14/XML/Parser/Encodings/koi8-r.enc 
    2022/home/ubuntu/research/code/greenstone3-svn/gs2build/perllib/cpan/perl-5.14/XML/Parser/Encodings/windows-1250.enc 
     23/home/ubuntu/research/code/greenstone3-svn/gs2build/perllib/cpan/perl-5.14/XML/Parser/Encodings/windows-1251.enc 
    2124/home/ubuntu/research/code/greenstone3-svn/gs2build/perllib/cpan/perl-5.14/XML/Parser/Encodings/windows-1252.enc 
     25/home/ubuntu/research/code/greenstone3-svn/gs2build/perllib/cpan/perl-5.14/XML/Parser/Encodings/windows-1255.enc 
    2226/home/ubuntu/research/code/greenstone3-svn/gs2build/perllib/cpan/perl-5.14/XML/Parser/Encodings/x-euc-jp-jisx0221.enc 
    2327/home/ubuntu/research/code/greenstone3-svn/gs2build/perllib/cpan/perl-5.14/XML/Parser/Encodings/x-euc-jp-unicode.enc 
  • main/trunk/release-kits/shared/linux/XML-Parser/perl-5.14/perllocal.pod

    r27768 r27777  
    1 =head2 Sun Jul  7 01:24:07 2013: C<Module> L<XML::Parser|XML::Parser> 
     1=head2 Mon Jul  8 12:08:20 2013: C<Module> L<XML::Parser|XML::Parser> 
    22 
    33=over 4 
     
    1313=item * 
    1414 
    15 C<VERSION: 2.34> 
     15C<VERSION: 2.41> 
    1616 
    1717=item *