Update of /cvsroot/perl-xml/xml-simple/lib/XML
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16075/lib/XML
Modified Files:
Simple.pm
Log Message:
- remove occurrences of indirect object syntax
Index: Simple.pm
===================================================================
RCS file: /cvsroot/perl-xml/xml-simple/lib/XML/Simple.pm,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- Simple.pm 12 Oct 2006 08:57:51 -0000 1.31
+++ Simple.pm 29 Oct 2006 07:09:39 -0000 1.32
@@ -18,7 +18,7 @@
require XML::Simple;
- my $xs = new XML::Simple(options);
+ my $xs = XML::Simple->new(options);
my $ref = $xs->XMLin([<xml file or string>] [, <options>]);
@@ -149,7 +149,7 @@
$self = shift;
}
else {
- $self = new XML::Simple();
+ $self = XML::Simple->new();
}
@@ -321,7 +321,7 @@
carp "'nsexpand' option requires XML::SAX";
}
- my $xp = new XML::Parser(Style => 'Tree', @{$self->{opt}->{parseropts}});
+ my $xp = XML::Parser->new(Style => 'Tree', @{$self->{opt}->{parseropts}});
my($tree);
if($filename) {
# $tree = $xp->parsefile($filename); # Changed due to prob w/mod_perl
@@ -490,7 +490,7 @@
$self = shift;
}
else {
- $self = new XML::Simple();
+ $self = XML::Simple->new();
}
croak "XMLout() requires at least one argument" unless(@_);
@@ -1900,7 +1900,7 @@
An IO::Handle object will be read to EOF and its contents parsed. eg:
- $fh = new IO::File('/etc/params.xml');
+ $fh = IO::File->new('/etc/params.xml');
$ref = XMLin($fh);
=back
@@ -2651,7 +2651,7 @@
First create an XML::Simple parser object with your preferred defaults:
- my $xs = new XML::Simple(ForceArray => 1, KeepRoot => 1);
+ my $xs = XML::Simple->new(ForceArray => 1, KeepRoot => 1);
then call C<XMLin()> or C<XMLout()> as a method of that object:
|