Skip Menu |

This queue is for tickets about the Devel-PackagePath CPAN distribution.

Report information
The Basics
Id: 62490
Status: new
Priority: 0/
Queue: Devel-PackagePath

People
Owner: Nobody in particular
Requestors: charles.minc [...] wanadoo.fr
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.02
Fixed in: (no value)



Subject: Test failed in Windows
In windows this test failed because : is( $path->path, 'Foo/Bar'), 'got the right path' ); return is 'Foo\Bar' . I suggest to use File::Spec ; and the following modication : is( $path->path, File::Spec->catfile( 'Foo','Bar'), 'got the right path' ); that have fixed the problem in Windows.
Subject: 01.basic.t
use strict; use Test::More tests => 10; use File::Spec ; use Devel::PackagePath; ok( my $path = Devel::PackagePath->new( package => 'Foo::Bar::Baz' ), 'Create a path object' ); is( $path->path, File::Spec->catfile( 'Foo','Bar'), 'got the right path' ); ok( $path->create, 'create Foo/Bar' ); ok( -e 'Foo', 'Foo exists' ); ok( -e 'Foo/Bar', 'Foo/Bar exists' ); # XXX: We should figure out a safe way to do a remove inside # the package ok( $path->directory->rmtree, 'able to rmtree' ); ok( $path->directory->parent->remove, 'able to remote the parent' ); ok( !-e 'Foo/Bar', 'Foo/Bar is gone' ); ok( !-e 'Foo', 'Foo is gone' ); is( $path->file_name, 'Baz.pm', 'got the right file name' );