Debian Codegraph @

t/lib/Config/IniFiles/TestPaths.pm

raw
1 package Config::IniFiles::TestPaths;
2
3 use strict;
4 use warnings;
5
6 use File::Spec;
7
8 use base 'Exporter';
9
10 use vars (qw(@EXPORT));
11
12 @EXPORT = (qw(t_file t_unlink));
13
14 =head2 my $t_filename = t_file($filename)
15
16 Returns a portable filename under "./t" for $filename.
17
18 =cut
19
20 sub t_file
21 {
22 my $filename = shift;
23
24 return File::Spec->catfile( File::Spec->curdir(), "t", $filename );
25 }
26
27 =head2 t_unlink($filename)
28
29 Unlinks the t_file $filename.
30
31 =cut
32
33 sub t_unlink
34 {
35 my $filename = shift;
36
37 return unlink( t_file($filename) );
38 }
39
40 1;
41