Shlomi Fish committed e8df9cf

Improved the documentation.

Comments (0)

Files changed (2)

         - << $node = XML::LibXML::Comment( $content ); >> is wrong.
+    - Documentation: moved away from Indirect-object-notation and added
+    some missing "my"s:
+        -
 1.73            Sat Jun 18 10:53:44 IDT 2011
     - Calculating $err->column() properly, so it won't be maxed out at
       <programlisting>use XML::LibXML::Reader;</programlisting>
-      <programlisting>my $reader = new XML::LibXML::Reader(location =&gt; "file.xml")
+      <programlisting>my $reader = XML::LibXML::Reader-&gt;(location =&gt; "file.xml")
        or die "cannot read file.xml\n";
 while ($reader-&gt;read) {
 sub processNode {
-    $reader = shift;
+    my $reader = shift;
     printf "%d %d %s %d\n", ($reader-&gt;depth,
-  $reader = new XML::LibXML::Reader(location =&gt; "file.xml")
+  my $reader = XML::LibXML::Reader-&gt;(location =&gt; "file.xml")
        or die "cannot read file.xml\n";
       <programlisting>use XML::LibXML;
-my $compiled_xpath = new XML::LibXML::XPathExpression('//foo[@bar="baz"][position()&lt;4]');
+my $compiled_xpath = XML::LibXML::XPathExpression-&gt;('//foo[@bar="baz"][position()&lt;4]');
 # interface from XML::LibXML::Node 
       <programlisting>use XML::LibXML;
-my $pattern = new XML::LibXML::Pattern('/x:html/x:body//x:div', { 'x' => '' });
+my $pattern = XML::LibXML::Pattern-&gt;new('/x:html/x:body//x:div', { 'x' => '' });
 # test a match on a XML::LibXML::Node $node
 if ($pattern->matchesNode($node)) { ... }
       <programlisting>use XML::LibXML;
-my $compiled_re = new XML::LibXML::RegExp('[0-9]{5}(-[0-9]{4})?');
+my $compiled_re = XML::LibXML::RegExp-&gt;('[0-9]{5}(-[0-9]{4})?');
 if ($compiled_re->isDeterministic()) { ... }
 if ($compiled_re->matches($string)) { ... }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.