Show
Ignore:
Timestamp:
03/05/09 21:36:20 (6 years ago)
Author:
charsbar
Message:

Path-Extended: fixed relative/absolute issue; 0.08 -> CPAN

Location:
lang/perl/Path-Extended/trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/Path-Extended/trunk/Changes

    r30855 r30866  
    11Revision history for Path-Extended 
     2 
     30.08 2009/03/05 
     4  - fixed relative/absolute path issue 
    25 
    360.07 2009/03/05 
  • lang/perl/Path-Extended/trunk/lib/Path/Extended.pm

    r30855 r30866  
    77use Path::Extended::Dir; 
    88 
    9 our $VERSION = '0.07'; 
     9our $VERSION = '0.08'; 
    1010 
    1111our @EXPORT = our @EXPORT_OK = qw( file dir ); 
  • lang/perl/Path-Extended/trunk/lib/Path/Extended/Entity.pm

    r30855 r30866  
    3636    $item = $class->new( File::Basename::dirname($self->absolute) ); 
    3737  } 
     38  elsif ( @parts && File::Spec->file_name_is_absolute($parts[0]) ) { 
     39    $item = $class->new( @parts ); 
     40  } 
    3841  else { 
    3942    $item = $class->new( $self->absolute, @parts ); 
  • lang/perl/Path-Extended/trunk/t/lib/Path/Extended/Test/Dir/Find.pm

    r22164 r30866  
    66use Path::Extended; 
    77 
    8 sub find : Tests(4) { 
     8sub find : Tests(7) { 
    99  my $class = shift; 
    1010 
    1111  my $dir = dir('t/tmp/find')->mkdir; 
     12  ok $dir->exists, $class->message('created '.$dir->relative); 
    1213 
    1314  my $file1 = file('t/tmp/find/some.txt'); 
    1415     $file1->save('some content'); 
     16  ok $file1->exists, $class->message('created '.$file1->relative); 
    1517 
    1618  my $file2 = file('t/tmp/find/other.txt'); 
    1719     $file2->save('other content'); 
     20  ok $file2->exists, $class->message('created '.$file2->relative); 
    1821 
    1922  my @files = $dir->find('*.txt'); 
     
    3538} 
    3639 
    37 sub find_dir : Tests(4) { 
     40sub find_dir : Tests(6) { 
    3841  my $class = shift; 
    3942 
    4043  my $dir  = dir('t/tmp/find_dir'); 
    4144  my $dir1 = dir('t/tmp/find_dir/found')->mkdir; 
     45  ok $dir1->exists, $class->message('created '.$dir1->relative); 
     46 
    4247  my $dir2 = dir('t/tmp/find_dir/not_found')->mkdir; 
     48  ok $dir2->exists, $class->message('created '.$dir2->relative); 
    4349 
    4450  my $rule = '*';