Upgrade to podlators-2.0.2
[p5sagit/p5-mst-13.2.git] / pod / pod2text.PL
index 785a3f3..a978f71 100644 (file)
@@ -37,7 +37,7 @@ print OUT <<'!NO!SUBS!';
 
 # pod2text -- Convert POD data to formatted ASCII text.
 #
-# Copyright 1999, 2000, 2001 by Russ Allbery <rra@stanford.edu>
+# Copyright 1999, 2000, 2001, 2004, 2006 by Russ Allbery <rra@stanford.edu>
 #
 # This program is free software; you may redistribute it and/or modify it
 # under the same terms as Perl itself.
@@ -99,11 +99,10 @@ if ($options{color}) {
 delete @options{'color', 'termcap', 'overstrike'};
 
 # Initialize and run the formatter.
+my $parser = $formatter->new (%options);
 do {
-    my $parser = $formatter->new (%options);
     my ($input, $output) = splice (@ARGV, 0, 2);
-    $parser->parse_file ($input, $output);
-    undef $parser;
+    $parser->parse_from_file ($input, $output);
 } while (@ARGV);
 
 __END__
@@ -273,7 +272,7 @@ Russ Allbery <rra@stanford.edu>.
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 1999, 2000, 2001, 2004 by Russ Allbery <rra@stanford.edu>.
+Copyright 1999, 2000, 2001, 2004, 2006 by Russ Allbery <rra@stanford.edu>.
 
 This program is free software; you may redistribute it and/or modify it
 under the same terms as Perl itself.