You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Angus Lees <gu...@inodes.org> on 2002/10/16 00:18:35 UTC

WrapXS.pm empty class patch

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


Re: WrapXS.pm empty class patch

Posted by Gerald Richter <ri...@ecos.de>.
>sorry, i thought someone else had already reported it.

Yes, it was reported, I just didn't get it here...

>(this is libxslt 1.0.18, i'm guessing the indent=yes behaviour has
>changed?)

I think this is the reason. I have installed libxslt 1.0.9 here. I will
upgrade and see what will happen

Gerald





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


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


Re: WrapXS.pm empty class patch

Posted by Angus Lees <gu...@inodes.org>.
At Wed, 16 Oct 2002 08:36:58 +0200, Gerald Richter wrote:
> > 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)
> 
> Yes, I have done some work to get it working with 5.8.0. Thanks for the
> verification. I don't see this head xslt problem here, but I also not have
> looked deeper into it.

sorry, i thought someone else had already reported it.

it seems that pretty much all libxslt tests are failing with the same
error:

 #199 xml/pod.xml embperl -> libxslt...
 Error in Line 3
 Is:     > <head><
 Should: ><head><

(i haven't compiled successfully against xalan yet, so i don't know if
it happens then too)

#199 test/tmp/out.htm attached, note the indenting of the <head> block.

(this is libxslt 1.0.18, i'm guessing the indent=yes behaviour has
changed?)


Re: WrapXS.pm empty class patch

Posted by Gerald Richter <ri...@ecos.de>.

>
> 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).
>

Mmmh, I don't had this issue so far, but I didn't tried xsbuilder with Perl
5.8.0...

> 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.
>

Thanks for the patch

> 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)
>

Yes, I have done some work to get it working with 5.8.0. Thanks for the
verification. I don't see this head xslt problem here, but I also not have
looked deeper into it.

Gerald


-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------


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