Subject: | my_desktop, my_documents and my_data all return home dir |
on Linux artg-laptop 2.6.32-22-generic #33-Ubuntu SMP Wed Apr 28 13:27:30 UTC
2010 i686 GNU/Linux
my_desktop, my_documents and my_data all return the home dir.
and File-HomeDir-0.89-L_Ub32/t/02_main.t reports no errors because it doesn't
test those functions.
Try the attached.
This is perl, v5.10.1 (*) built for i486-linux-gnu-thread-multi
Subject: | testFHD.pl |
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
use File::HomeDir;
# use File::Spec::Functions ':ALL';
use Test::More;
my $desktop = File::HomeDir->my_desktop;
print "$desktop\n";
my $my_documents = File::HomeDir->my_documents;
print "$my_documents\n";
my $data = File::HomeDir->my_data;
print "$data\n";
my $docs = File::HomeDir->users_documents('artg');
print "$docs\n";
$my_documents = File::HomeDir->my_documents;
my $my_documents2 = File::HomeDir::my_documents();
is( $my_documents, $my_documents2, 'Different APIs give the same results' );
ok( !!($my_documents and is_dir $my_documents), 'Found our documents directory' );
ok( !!($my_documents2 and $my_documents2), 'Found our documents directory' );