Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When Pod-Simple is in PERL_CORE we can build with a readonly source directory #175

Merged
merged 1 commit into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion t/JustPod_corpus.t
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use Pod::Simple::JustPod;
my @test_files;

BEGIN {
my $test_dir = File::Basename::dirname(Cwd::abs_path(__FILE__));
my $test_dir = File::Basename::dirname(File::Spec->rel2abs(__FILE__));

print "# TESTDIR: $test_dir\n";

Expand Down
3 changes: 1 addition & 2 deletions t/corpus.t
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@ BEGIN {
#use Pod::Simple::Debug (10);

use File::Spec;
use Cwd ();
use File::Basename ();

my(@testfiles, %xmlfiles, %wouldxml);
#use Pod::Simple::Debug (10);
BEGIN {
my $corpusdir = File::Spec->catdir(File::Basename::dirname(Cwd::abs_path(__FILE__)), 'corpus');
my $corpusdir = File::Spec->catdir(File::Basename::dirname(File::Spec->rel2abs(__FILE__)), 'corpus');
note "Corpusdir: $corpusdir";

opendir(my $indir, $corpusdir) or die "Can't opendir $corpusdir : $!";
Expand Down
3 changes: 1 addition & 2 deletions t/encod01.t
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ use Pod::Simple::DumpAsXML;
my $thefile;

use File::Spec;
use Cwd ();
use File::Basename ();

BEGIN {
my $corpusdir = File::Spec->catdir(File::Basename::dirname(Cwd::abs_path(__FILE__)), 'corpus');
my $corpusdir = File::Spec->catdir(File::Basename::dirname(File::Spec->rel2abs(__FILE__)), 'corpus');
$thefile = File::Spec->catfile($corpusdir, 'nonesuch.txt');
}

Expand Down
3 changes: 1 addition & 2 deletions t/htmlbat.t
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ use Test::More tests => 13;
require Pod::Simple::HTMLBatch;

use File::Spec ();
use Cwd ();
use File::Basename ();

my $t_dir = File::Basename::dirname(Cwd::abs_path(__FILE__));
my $t_dir = File::Basename::dirname(File::Spec->rel2abs(__FILE__));
my $corpus_dir = File::Spec->catdir($t_dir, 'testlib1');

my $temp_dir = File::Spec->tmpdir;
Expand Down
3 changes: 1 addition & 2 deletions t/output.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ use warnings;
use Test::More tests => 36;

use File::Spec;
use Cwd ();
use File::Basename ();

my $t_dir = File::Basename::dirname(Cwd::abs_path(__FILE__));
my $t_dir = File::Basename::dirname(File::Spec->rel2abs(__FILE__));

for my $format (qw(XHTML HTML Text RTF)) {
my $class = "Pod::Simple::$format";
Expand Down
3 changes: 1 addition & 2 deletions t/reinit.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use warnings;
use Test::More tests => 5;

use File::Spec;
use Cwd ();
use File::Basename ();

use Pod::Simple::Text;
Expand All @@ -18,7 +17,7 @@ foreach my $file (
"perlfaq.pod",
"perlvar.pod",
) {
my $full_file = File::Spec->catfile(File::Basename::dirname(Cwd::abs_path(__FILE__)), $file);
my $full_file = File::Spec->catfile(File::Basename::dirname(File::Spec->rel2abs(__FILE__)), $file);

unless(-e $full_file) {
ok 0;
Expand Down
3 changes: 1 addition & 2 deletions t/render.t
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ $Pod::Simple::Text::FREAKYMODE = 1;
use Pod::Simple::TiedOutFH ();

use File::Spec;
use Cwd ();
use File::Basename ();

my $outfile = '10000';
Expand All @@ -26,7 +25,7 @@ foreach my $file (
"perlfaq.pod",
"perlvar.pod",
) {
my $full_file = File::Spec->catfile(File::Basename::dirname(Cwd::abs_path(__FILE__)), $file);
my $full_file = File::Spec->catfile(File::Basename::dirname(File::Spec->rel2abs(__FILE__)), $file);

unless(-e $full_file) {
ok 0;
Expand Down
3 changes: 1 addition & 2 deletions t/rtf_utf8.t
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ else {
}

use File::Spec;
use Cwd ();
use File::Basename ();

my $t_dir = File::Basename::dirname(Cwd::abs_path(__FILE__));
my $t_dir = File::Basename::dirname(File::Spec->rel2abs(__FILE__));

my $expected = join "", <DATA>;

Expand Down
3 changes: 1 addition & 2 deletions t/search10.t
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ die "Couldn't make an object!?" unless ok defined $x;
$x->inc(0);

use File::Spec;
use Cwd ();
use File::Basename ();

my $t_dir = File::Basename::dirname(Cwd::abs_path(__FILE__));
my $t_dir = File::Basename::dirname(File::Spec->rel2abs(__FILE__));

my $here = File::Spec->catdir($t_dir, 'testlib1');

Expand Down
3 changes: 1 addition & 2 deletions t/search12.t
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ die "Couldn't make an object!?" unless ok defined $x;
$x->inc(0);

use File::Spec;
use Cwd ();
use File::Basename ();

my $t_dir = File::Basename::dirname(Cwd::abs_path(__FILE__));
my $t_dir = File::Basename::dirname(File::Spec->rel2abs(__FILE__));

my $here = File::Spec->catdir($t_dir, 'testlib1');

Expand Down
3 changes: 1 addition & 2 deletions t/search20.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ $x->callback(sub {
});

use File::Spec;
use Cwd ();
use File::Basename ();

my $t_dir = File::Basename::dirname(Cwd::abs_path(__FILE__));
my $t_dir = File::Basename::dirname(File::Spec->rel2abs(__FILE__));

my $here1 = File::Spec->catdir($t_dir, 'testlib1');
my $here2 = File::Spec->catdir($t_dir, 'testlib2');
Expand Down
3 changes: 1 addition & 2 deletions t/search22.t
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ $x->inc(0);
$x->shadows(1);

use File::Spec;
use Cwd ();
use File::Basename ();

my $t_dir = File::Basename::dirname(Cwd::abs_path(__FILE__));
my $t_dir = File::Basename::dirname(File::Spec->rel2abs(__FILE__));

my $here1 = File::Spec->catdir($t_dir, 'testlib1');
my $here2 = File::Spec->catdir($t_dir, 'testlib2');
Expand Down
3 changes: 1 addition & 2 deletions t/search25.t
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ $x->inc(0);
$x->shadows(1);

use File::Spec;
use Cwd ();
use File::Basename ();

my $t_dir = File::Basename::dirname(Cwd::abs_path(__FILE__));
my $t_dir = File::Basename::dirname(File::Spec->rel2abs(__FILE__));

my $here1 = File::Spec->catdir($t_dir, 'testlib1');
my $here2 = File::Spec->catdir($t_dir, 'testlib2');
Expand Down
3 changes: 1 addition & 2 deletions t/search26.t
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ $x->inc(0);
$x->shadows(1);

use File::Spec;
use Cwd ();
use File::Basename ();

my $t_dir = File::Basename::dirname(Cwd::abs_path(__FILE__));
my $t_dir = File::Basename::dirname(File::Spec->rel2abs(__FILE__));

my $here1 = File::Spec->catdir($t_dir, 'testlib1');
my $here2 = File::Spec->catdir($t_dir, 'testlib2');
Expand Down
3 changes: 1 addition & 2 deletions t/search27.t
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ $x->inc(0);
$x->shadows(1);

use File::Spec;
use Cwd ();
use File::Basename ();

my $t_dir = File::Basename::dirname(Cwd::abs_path(__FILE__));
my $t_dir = File::Basename::dirname(File::Spec->rel2abs(__FILE__));

my $here1 = File::Spec->catdir($t_dir, 'testlib1');
my $here2 = File::Spec->catdir($t_dir, 'testlib2');
Expand Down
3 changes: 1 addition & 2 deletions t/search28.t
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ $x->inc(0);
$x->shadows(1);

use File::Spec;
use Cwd ();
use File::Basename ();

my $t_dir = File::Basename::dirname(Cwd::abs_path(__FILE__));
my $t_dir = File::Basename::dirname(File::Spec->rel2abs(__FILE__));

my $here1 = File::Spec->catdir($t_dir, 'testlib1');
my $here2 = File::Spec->catdir($t_dir, 'testlib2');
Expand Down
3 changes: 1 addition & 2 deletions t/search29.t
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ $x->inc(0);
$x->shadows(1);

use File::Spec;
use Cwd ();
use File::Basename ();

my $t_dir = File::Basename::dirname(Cwd::abs_path(__FILE__));
my $t_dir = File::Basename::dirname(File::Spec->rel2abs(__FILE__));

my $here1 = File::Spec->catdir($t_dir, 'testlib1');
my $here2 = File::Spec->catdir($t_dir, 'testlib2');
Expand Down
3 changes: 1 addition & 2 deletions t/search60.t
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ $x->inc(0);
$x->is_case_insensitive(0);

use File::Spec;
use Cwd ();
use File::Basename ();

my $t_dir = File::Basename::dirname(Cwd::abs_path(__FILE__));
my $t_dir = File::Basename::dirname(File::Spec->rel2abs(__FILE__));

my $A = File::Spec->catdir($t_dir, 'search60', 'A');
my $B = File::Spec->catdir($t_dir, 'search60', 'B');
Expand Down
Loading