stas        01/12/13 20:51:55

  Modified:    lib/ModPerl WrapXS.pm
  Log:
  - use portable catfile instead of join '/', ...
  
  Revision  Changes    Path
  1.38      +5 -4      modperl-2.0/lib/ModPerl/WrapXS.pm
  
  Index: WrapXS.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/WrapXS.pm,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- WrapXS.pm 2001/12/14 04:10:20     1.37
  +++ WrapXS.pm 2001/12/14 04:51:55     1.38
  @@ -11,6 +11,7 @@
   use File::Path qw(rmtree mkpath);
   use Cwd qw(fastcwd);
   use Data::Dumper;
  +use File::Spec::Functions qw(catfile);
   
   our $VERSION = '0.01';
   
  @@ -220,7 +221,7 @@
   sub prepare {
       my $self = shift;
       $self->{DIR} = 'WrapXS';
  -    $self->{XS_DIR} = join '/', fastcwd(), 'xs';
  +    $self->{XS_DIR} = catfile fastcwd(), 'xs';
   
       if (-e $self->{DIR}) {
           rmtree([$self->{DIR}], 1, 1);
  @@ -242,7 +243,7 @@
   
       my $dirname = $self->class_dirname($class);
       my $dir = ($dirname =~ m:/: and $dirname !~ m:^$self->{DIR}:) ?
  -      join('/', $self->{DIR}, $dirname) : $dirname;
  +      catfile($self->{DIR}, $dirname) : $dirname;
   
       mkpath [$dir], 1, 0755 unless -d $dir;
   
  @@ -251,7 +252,7 @@
   
   sub class_file {
       my($self, $class, $file) = @_;
  -    join '/', $self->class_dir($class), $file;
  +    catfile $self->class_dir($class), $file;
   }
   
   sub cname {
  @@ -544,7 +545,7 @@
   
       $method = $method . '_code';
       my($h, $code) = $self->typemap->$method();
  -    my $file = join '/', $self->{XS_DIR}, $h;
  +    my $file = catfile $self->{XS_DIR}, $h;
   
       open my $fh, '>', $file or die "open $file: $!";
       print $fh $self->ModPerl::Code::noedit_warning_c(), "\n";
  
  
  


Reply via email to