perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angus Lees <...@inodes.org>
Subject WrapXS.pm empty class patch
Date Tue, 15 Oct 2002 22:18:35 GMT

i was trying to build Embperl from CVS and found that xs/Makefile.PL
wasn't being generated correctly:

 write_missing_makefilepls always calls $self->write_makefilepl('').
 write_makefilepl dies on an empty $class (since $parts[-1] is undef).

simple patch attached. this generates identical output to the
xs/Makefile.PL shipped with Embperl 2.0b8, so i'm guessing you've
already applied a similar fix locally.

i haven't done any further testing yet, but Embperl cvs passes all
make tests (except for the " <head>"/"<head>" xslt issue).
(perl 5.8, mod_perl 1.27, libxslt 1.0.18, no xalan)


diff -c /usr/local/share/perl/5.8.0/ExtUtils/XSBuilder/WrapXS.pm~ /usr/local/share/perl/5.8.0/ExtUtils/XSBuilder/WrapXS.pm
--- /ExtUtils/XSBuilder/WrapXS.pm~	2002-10-16 08:03:45.000000000 +1000
+++ /ExtUtils/XSBuilder/WrapXS.pm	2002-10-16 08:03:45.000000000 +1000
@@ -1174,18 +1174,20 @@
 
     my $includes = $self->includes;
     my @parts = split '::', $class ;
-    my $xs = $parts[-1] . '.c';
-    my $deps = {$xs => ""};
+    my $deps;
+    if (@parts) {
+      my $xs = $parts[-1] . '.c';
+      $deps = {$xs => ""};
 
-    if (my $mod_h = $self->mod_h($class, 1)) {
+      if (my $mod_h = $self->mod_h($class, 1)) {
         my $abs = File::Spec -> rel2abs ($mod_h) ;
         my $rel = File::Spec -> abs2rel ($abs, $self -> class_dir ($class)) ;
         $deps->{$xs} .= " $rel";
-    }
+      }
 
-    local $Data::Dumper::Terse = 1;
-    $deps = Dumper $deps;
-    $deps = undef if (!$class) ;
+      local $Data::Dumper::Terse = 1;
+      $deps = Dumper $deps;
+    }
 
     $class ||=  'WrapXS' ;
     print $fh $self -> makefilepl_text ($class, $deps, ('../' x @parts) . 'typemap') ;

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message