r52276 - /trunk/libperl-apireference-perl/debian/regenerate.pl

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Sun Feb 7 14:24:04 UTC 2010


Author: dmn
Date: Sun Feb  7 14:23:57 2010
New Revision: 52276

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=52276
Log:
replace invocimg author_scripts/generate.pl via system() with direct usage of Perl::APIReference::Generator

Modified:
    trunk/libperl-apireference-perl/debian/regenerate.pl

Modified: trunk/libperl-apireference-perl/debian/regenerate.pl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libperl-apireference-perl/debian/regenerate.pl?rev=52276&op=diff
==============================================================================
--- trunk/libperl-apireference-perl/debian/regenerate.pl (original)
+++ trunk/libperl-apireference-perl/debian/regenerate.pl Sun Feb  7 14:23:57 2010
@@ -22,12 +22,6 @@
   return $v;
 }
 
-sub my_system {
-  print "  Running: @_\n";
-  system(@_);
-  die("Command failed.") if(($? >> 8) != 0);
-}
-
 opendir D, 'data';
 my @list = readdir D;
 @list = grep /perlapi/, @list;
@@ -49,6 +43,15 @@
   $perl_ver =~ s/000$//;    # 5.006000 => 5.006
   my $generated = "$target";
   $generated =~ s/.*\///g;
-  my_system("perl", "-I", "lib", "./author_scripts/generate.pl", $data, $perl_ver);
+
+  my $api = Perl::APIReference::Generator->parse(
+      file => $data,
+      perl_version => $perl_ver,
+  );
+
+  if ($api) {
+      $api->_dump_as_class();
+  }
+
   move($generated, $target) or die "Error while moving $generated to $target: $!\n";
 }




More information about the Pkg-perl-cvs-commits mailing list