Hi all,

  http://rt.cpan.org/Ticket/Display.html?id=20532

Steve is attempting to make an EU::MM-compatible distro with .xs files 
and .inc files.

  xs_files => {'Foo.xs' => 'Foo.xs'}

needs to be:

  xs_files => {'./Foo.xs' => './Foo.xs'}

I've found that _infer_xs_spec() is the culprit responsible for 
attempting to create "/Foo.c". (because File::Spec->catfile("", "foo") 
gives "/foo".)

Now, I can either put something like this in _infer_xs_spec() ...

  my( $v, $d, $f ) = File::Spec->splitpath( $file );
  $d = '.' unless(length($d)); # don't create file in /

... or we can say that xs_files keys and values must contain a slash (in 
this case, must start with a "./") and find an appropriate place to die 
with a nice message about that.

The related confusion of deleting the xs_files value in this case:

  xs_files => {'Foo.xs' => './Foo.xs'}

is because of the 'eq' check causing './Foo.xs' to be added to cleanup.  
This should probably be an is_same_file sort of check instead, no?

--Eric
-- 
"Politics is not a bad profession. If you succeed there are many
rewards, if you disgrace yourself you can always write a book."
--Ronald Reagan
---------------------------------------------------
    http://scratchcomputing.com
---------------------------------------------------

Reply via email to