Commits

Anonymous committed b90ece6

Final tweaks before release

Comments (0)

Files changed (3)

 example/bad.xml
 example/libxml.xml
 example/xml2pod.pl
-pod/XML/LibXML/Document.pod
-pod/XML/LibXML/Comment.pod
-pod/XML/LibXML/Text.pod
-pod/XML/LibXML/CDATASection.pod
-pod/XML/LibXML/Element.pod
-pod/XML/LibXML/Node.pod
+lib/XML/LibXML/Document.pod
+lib/XML/LibXML/Comment.pod
+lib/XML/LibXML/Text.pod
+lib/XML/LibXML/CDATASection.pod
+lib/XML/LibXML/Element.pod
+lib/XML/LibXML/Node.pod
 t/01basic.t
 t/02parsestring.t
 t/03parsefile.t
 
 # have_library("xml2", "ghttp_get_header_names");
 
+print "creating POD files\n";
+
+system($^X, "example/xml2pod.pl");
+
 WriteMakefile(
     'NAME'	=> 'XML::LibXML',
     'VERSION_FROM' => 'LibXML.pm', # finds $VERSION

example/xml2pod.pl

 # the data into different POD Files. 
 
 {
-  my $xml_file = "./libxml.xml";
+  my $xml_file = "example/libxml.xml";
 
   # init the file parser
   my $parser = XML::LibXML->new();
   }
   
   # print the data to a separated POD File
-  open FILE , "> ".$node->getAttribute("name").".pod" ||
+  my $filename = $node->getAttribute("name");
+  $filename =~ s/::/\//g;
+  print("writing file: lib/${filename}.pod\n");
+  open FILE , "> lib/${filename}.pod" ||
     do{
       warn "cannot open file...\n"; 
       return ; # don't proceed if there is no open descriptor