Finance-Bank-IE
view release on metacpan or search on metacpan
t/lib/Test/Util.pm view on Meta::CPAN
sub getfile {
my $file = shift;
my $context = shift;
my $content;
$file =~ s@/$@/index.html@;
# figure out which bank test is calling us and use that to find the files
if ( !$context ) {
( $context ) = (caller)[1];
$context =~ s@t/(.*)\.t$@$1@;
$context =~ s@\.pm$@@;
}
$file =~ s@^\w+?://[^/]+@@;
$file =~ s@^(.*/)*@data/$context/@;
while ( 1 ) {
( my $fs_file = $file ) =~ s/\?/_/;
print STDERR "# looking for $fs_file\n" if $ENV{DEBUG};
t/lib/Test/Util.pm view on Meta::CPAN
next;
}
}
last;
}
}
sub setup {
my ( $MODULE_UNDER_TEST ) = (caller)[1] =~ m@/?(\w+)\.t$@;
eval "use Test::MockBank::$MODULE_UNDER_TEST\n";
$MODULE_UNDER_TEST;
}
=back
=cut
( run in 0.439 second using v1.01-cache-2.11-cpan-a3c8064c92c )