From: Graham Knop Date: Mon, 3 Aug 2020 10:53:54 +0000 (+0200) Subject: use @INC to find helper location rather than FindBin in generated_app test X-Git-Tag: v1.42~14 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Devel.git;a=commitdiff_plain;h=4ac8e3fd6a82ef7140290880d55a8bd6595f0c59 use @INC to find helper location rather than FindBin in generated_app test --- diff --git a/t/generated_app.t b/t/generated_app.t index 76a4222..a066e81 100644 --- a/t/generated_app.t +++ b/t/generated_app.t @@ -4,7 +4,7 @@ use lib (); use Cwd qw( abs_path ); use File::Spec::Functions qw( devnull catdir catfile updir rel2abs ); use File::Temp qw( tempdir ); -use FindBin qw( $Bin ); +use File::Basename qw( dirname ); use Catalyst::Helper; use Test::More; use Config; @@ -12,6 +12,8 @@ use Config; eval "use IPC::Run3"; plan skip_all => 'These tests require IPC::Run3' if $@; +my $helper_lib = abs_path(catdir(dirname($INC{'Catalyst/Helper.pm'}), updir)); + my $share_dir = abs_path('share'); plan skip_all => "No share dir at $share_dir!" unless -d $share_dir; @@ -179,7 +181,7 @@ sub command_ok { sub runperl { my $comment = pop @_; - command_ok( [ $^X, '-I', catdir($Bin, '..', 'lib'), @_ ], $comment ); + command_ok( [ $^X, '-I', $helper_lib, @_ ], $comment ); } my @generated_component_tests;