Description: look for file in different directory when run under autopkgtest
Origin: vendor
Forwarded: not-needed
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2025-11-16

--- a/t/06_pa_example.t
+++ b/t/06_pa_example.t
@@ -10,9 +10,12 @@
 # This test is just to validate that the example provided at the start of the
 # Pod::Abstract documentation actually works!
 
+use Config;
+my $dir = $ENV{AUTOPKGTEST_TMP} ? $Config{vendorlib} : 'lib';
+
 # Get all the first level headings, and put them in a verbatim block
 # at the start of the document
-my $pa = Pod::Abstract->load_file('lib/Pod/Abstract.pm');
+my $pa = Pod::Abstract->load_file("$dir/Pod/Abstract.pm");
 my @headings = $pa->select('/head1@heading');
 my @headings_text = map { $_->pod } @headings;
 my $headings_node = node->verbatim(join "\n",@headings_text);
