Update of /cvsroot/mason/mason/dist/lib/HTML/Mason
In directory usw-pr-cvs1:/tmp/cvs-serv15216/lib/HTML/Mason
Modified Files:
Tag: mason-1-0-branch
Tests.pm
Log Message:
remove File::Spec dependency
Index: Tests.pm
===================================================================
RCS file: /cvsroot/mason/mason/dist/lib/HTML/Mason/Tests.pm,v
retrieving revision 1.4.2.4.2.3
retrieving revision 1.4.2.4.2.4
diff -u -r1.4.2.4.2.3 -r1.4.2.4.2.4
--- Tests.pm 2001/02/20 21:14:10 1.4.2.4.2.3
+++ Tests.pm 2001/03/27 01:48:24 1.4.2.4.2.4
@@ -5,7 +5,6 @@
use Cwd;
use File::Path;
-use File::Spec;
use HTML::Mason;
@@ -238,12 +237,12 @@
if (ref $proto)
{
- $proto->{base_path} ||= File::Spec->catdir( cwd(), 'mason_tests' );
+ $proto->{base_path} ||= join '/', cwd(), 'mason_tests';
return $proto->{base_path};
}
else
{
- return File::Spec->catdir( cwd(), 'mason_tests' );
+ return join '/', cwd(), 'mason_tests';
}
}
@@ -251,14 +250,14 @@
{
my $proto = shift;
- return File::Spec->catdir( $proto->base_path, 'comps' );
+ return join '/', $proto->base_path, 'comps';
}
sub data_dir
{
my $proto = shift;
- return File::Spec->catdir( $proto->base_path, 'data' );
+ return join '/', $proto->base_path, 'data';
}
sub _write_shared_comps
@@ -272,7 +271,7 @@
my @path = split m(/), $comp->{path};
my $file = pop @path;
- my $dir = File::Spec->catdir( $self->comp_root, @path );
+ my $dir = join '/', $self->comp_root, @path;
$self->write_comp( $comp->{path}, $dir, $file, $comp->{component} );
}
@@ -293,7 +292,7 @@
my @path = split m(/), $supp->{path};
my $file = pop @path;
- my $dir = File::Spec->catdir( $self->comp_root, $self->{name}, @path );
+ my $dir = join '/', $self->comp_root, $self->{name}, @path;
$self->write_comp( $supp->{path}, $dir, $file, $supp->{component} );
}
@@ -307,7 +306,7 @@
my @path = split m(/), $test->{path};
my $file = pop @path;
- my $dir = File::Spec->catdir( $self->comp_root, $self->{name}, @path );
+ my $dir = join '/', $self->comp_root, $self->{name}, @path;
unless ( -d $dir )
{
print "Making dir: $dir\n" if $DEBUG;
@@ -330,7 +329,7 @@
or die "Unable to create directory '$dir': $!";
}
- my $real_file = File::Spec->catfile( $dir, $file );
+ my $real_file = join '/', $dir, $file;
print "Making component $path at $real_file\n"
if $DEBUG;
|